Skip to content

Commit

Permalink
Improvement: Only add load OffCanvas module when offcanvas region is …
Browse files Browse the repository at this point in the history
…enabled, solves #343
  • Loading branch information
mwehr authored Jul 24, 2023
1 parent af36eaa commit bbbdb49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Changes

### Unreleased

* 2023-07-24 - Improvement: Only add load OffCanvas module when offcanvas region is enabled, solves #343.
* 2023-07-11 - Improvement: Place mustache templates which are overridden from theme_boost into subfolder, solves #337.
* 2023-07-10 - Bugfix: Omit warning when no CSS cached folder present, solves #330.
* 2023-07-10 - Bugfix: Overwriting module purposes did not affect all places where the activity icon is displayed, solves #318.
Expand Down
4 changes: 2 additions & 2 deletions templates/theme_boost/drawers.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@
</html>
{{#js}}
M.util.js_pending('theme_boost/loader');
require(['theme_boost/loader', 'theme_boost/drawer', 'theme_boost_union/offcanvas'], function(Loader, Drawer, OffCanvas) {
require(['theme_boost/loader', 'theme_boost/drawer'{{#regions.offcanvas.hasblocks}},'theme_boost_union/offcanvas'{{/regions.offcanvas.hasblocks}}], function(Loader, Drawer{{#regions.offcanvas.hasblocks}},OffCanvas{{/regions.offcanvas.hasblocks}}) {
Drawer.init();
M.util.js_complete('theme_boost/loader');
OffCanvas.init();
{{#regions.offcanvas.hasblocks}}OffCanvas.init();{{/regions.offcanvas.hasblocks}}
});
{{/js}}

0 comments on commit bbbdb49

Please sign in to comment.