diff options
| author | XhmikosR <[email protected]> | 2023-03-29 11:00:31 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-03-29 11:00:31 +0300 |
| commit | 7a7fc1ad34d61a22b6cded76de1dc2e1acfe6fc1 (patch) | |
| tree | 2b20a1dadf365f28018a22e66b125374bb2b9dab /js/src | |
| parent | c953096a404497a4e28342342a7f103e2e65c9c2 (diff) | |
| download | bootstrap-7a7fc1ad34d61a22b6cded76de1dc2e1acfe6fc1.tar.xz bootstrap-7a7fc1ad34d61a22b6cded76de1dc2e1acfe6fc1.zip | |
Modal: drop loop (#38368)
We only have two elements to iterate over so it doesn't make a lot of sense to use a loop here
Diffstat (limited to 'js/src')
| -rw-r--r-- | js/src/modal.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/src/modal.js b/js/src/modal.js index 454d46aea..c4c410204 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -139,12 +139,12 @@ class Modal extends BaseComponent { } dispose() { - for (const htmlElement of [window, this._dialog]) { - EventHandler.off(htmlElement, EVENT_KEY) - } + EventHandler.off(window, EVENT_KEY) + EventHandler.off(this._dialog, EVENT_KEY) this._backdrop.dispose() this._focustrap.deactivate() + super.dispose() } |
