diff options
Diffstat (limited to 'js/src/offcanvas.js')
-rw-r--r-- | js/src/offcanvas.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/js/src/offcanvas.js b/js/src/offcanvas.js index 4fb2b2d9b2..28fd49f062 100644 --- a/js/src/offcanvas.js +++ b/js/src/offcanvas.js @@ -256,9 +256,11 @@ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function ( data.toggle(this) }) -EventHandler.on(window, EVENT_LOAD_DATA_API, () => - SelectorEngine.find(OPEN_SELECTOR).forEach(el => Offcanvas.getOrCreateInstance(el).show()) -) +EventHandler.on(window, EVENT_LOAD_DATA_API, () => { + for (const el of SelectorEngine.find(OPEN_SELECTOR)) { + Offcanvas.getOrCreateInstance(el).show() + } +}) enableDismissTrigger(Offcanvas) /** |