1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-29 06:49:06 +02:00

refactor(plugins): improve how we query elements

This commit is contained in:
Johann-S
2018-04-30 16:37:45 +02:00
parent 62cc0fda50
commit b1eb3fccfa
6 changed files with 34 additions and 26 deletions

View File

@@ -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
}