aboutsummaryrefslogtreecommitdiff
path: root/js/src/offcanvas.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/offcanvas.js')
-rw-r--r--js/src/offcanvas.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/js/src/offcanvas.js b/js/src/offcanvas.js
index ba809cdf2..28fd49f06 100644
--- a/js/src/offcanvas.js
+++ b/js/src/offcanvas.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): offcanvas.js
+ * Bootstrap (v5.1.2): offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -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)
/**