aboutsummaryrefslogtreecommitdiff
path: root/js/src/util.js
diff options
context:
space:
mode:
authorJohann-S <[email protected]>2018-04-30 16:37:45 +0200
committerJohann-S <[email protected]>2018-06-01 10:30:11 +0200
commitb1eb3fccfa722afc4f7ca0d00eb848353ce8aed8 (patch)
tree638af933a31acaabdedacf9a99a66e94662e6ae5 /js/src/util.js
parent62cc0fda50781606da5989b5a6eba6770bc34a51 (diff)
downloadbootstrap-b1eb3fccfa722afc4f7ca0d00eb848353ce8aed8.tar.xz
bootstrap-b1eb3fccfa722afc4f7ca0d00eb848353ce8aed8.zip
refactor(plugins): improve how we query elements
Diffstat (limited to 'js/src/util.js')
-rw-r--r--js/src/util.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/js/src/util.js b/js/src/util.js
index c20678fe0..e5521438e 100644
--- a/js/src/util.js
+++ b/js/src/util.js
@@ -82,8 +82,7 @@ const Util = (($) => {
}
try {
- const $selector = $(document).find(selector)
- return $selector.length > 0 ? selector : null
+ return document.querySelector(selector) ? selector : null
} catch (err) {
return null
}