Skip to content

Commit

Permalink
Merge branch 'release/1.6.47' into v1
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jul 9, 2022
2 parents f65c917 + f7319fa commit 0276804
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ImageOptimize Changelog

## 1.6.47 - 2022.07.08
### Fixed
* If there's no transform requested, return `null` so other plugins have a crack at it ([#349](https://github.com/nystudio107/craft-imageoptimize/issues/349))

## 1.6.46 - 2022.06.29
### Fixed
* Fixed an issue that could throw an exception when double-clicking on an asset, due to an incorrect asset bundle path
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft-imageoptimize",
"description": "Automatically create & optimize responsive image transforms, using either native Craft transforms or a service like imgix, with zero template changes.",
"type": "craft-plugin",
"version": "1.6.46",
"version": "1.6.47",
"keywords": [
"craft",
"cms",
Expand Down
4 changes: 4 additions & 0 deletions src/services/Optimize.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ public function handleGetAssetUrlEvent(GetAssetUrlEvent $event)
if (empty($transform)) {
$transform = null;
}
// If there's no transform requested, return `null` so other plugins have a crack at it
if ($transform === null) {
return null;
}
// If we're passed in null, make a dummy AssetTransform model for Thumbor
// For backwards compatibility
if ($transform === null && ImageOptimize::$plugin->transformMethod instanceof ThumborImageTransform) {
Expand Down
7 changes: 7 additions & 0 deletions src/web/assets/src/js/ImageOptimize.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
// Import our CSS
import '@/css/app.css';

// Accept HMR as per: https://vitejs.dev/guide/api-hmr.html
if (import.meta.hot) {
import.meta.hot.accept(() => {
console.log("HMR")
});
}
21 changes: 13 additions & 8 deletions src/web/assets/src/js/Welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@ import Vue from 'vue';
import ConfettiParty from '@/vue/ConfettiParty.vue';

new Vue({
el: "#cp-nav-content",
components: {
ConfettiParty,
},
data: {
},
methods: {
},
el: "#cp-nav-content",
components: {
ConfettiParty,
},
data: {},
methods: {},
});

// Accept HMR as per: https://vitejs.dev/guide/api-hmr.html
if (import.meta.hot) {
import.meta.hot.accept(() => {
console.log("HMR")
});
}

0 comments on commit 0276804

Please sign in to comment.