diff options
Diffstat (limited to 'js/src/modal.js')
-rw-r--r-- | js/src/modal.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/js/src/modal.js b/js/src/modal.js index ec67f1fa1b..b0ee089dee 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -175,8 +175,9 @@ class Modal extends BaseComponent { } dispose() { - [window, this._dialog] - .forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY)) + for (const htmlElement of [window, this._dialog]) { + EventHandler.off(htmlElement, EVENT_KEY) + } this._backdrop.dispose() this._focustrap.deactivate() |