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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user