diff options
| author | Johann-S <[email protected]> | 2019-07-23 21:15:00 +0200 |
|---|---|---|
| committer | Johann-S <[email protected]> | 2019-07-24 11:27:35 +0200 |
| commit | fc02932946424e986a72bb7b47044eab815851cb (patch) | |
| tree | 1fb51782942b8cd3d52edaa7146971c5e40a825b /js/src/modal | |
| parent | f4dbffe93adf5c71e16cc07dda24e66ce72d30b5 (diff) | |
| download | bootstrap-fc02932946424e986a72bb7b47044eab815851cb.tar.xz bootstrap-fc02932946424e986a72bb7b47044eab815851cb.zip | |
use get selector from element only when needed
Diffstat (limited to 'js/src/modal')
| -rw-r--r-- | js/src/modal/modal.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/js/src/modal/modal.js b/js/src/modal/modal.js index 4c430a01f..a0e460f22 100644 --- a/js/src/modal/modal.js +++ b/js/src/modal/modal.js @@ -9,7 +9,7 @@ import { jQuery as $, TRANSITION_END, emulateTransitionEnd, - getSelectorFromElement, + getElementFromSelector, getTransitionDurationFromElement, isVisible, makeArray, @@ -549,8 +549,7 @@ class Modal { */ EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { - const selector = getSelectorFromElement(this) - const target = SelectorEngine.findOne(selector) + const target = getElementFromSelector(this) if (this.tagName === 'A' || this.tagName === 'AREA') { event.preventDefault() |
