diff options
author | Johann-S <johann.servoire@gmail.com> | 2018-04-30 17:37:45 +0300 |
---|---|---|
committer | Johann-S <johann.servoire@gmail.com> | 2018-06-01 11:30:11 +0300 |
commit | b1eb3fccfa722afc4f7ca0d00eb848353ce8aed8 (patch) | |
tree | 638af933a31acaabdedacf9a99a66e94662e6ae5 /js/src/util.js | |
parent | 62cc0fda50781606da5989b5a6eba6770bc34a51 (diff) |
refactor(plugins): improve how we query elements
Diffstat (limited to 'js/src/util.js')
-rw-r--r-- | js/src/util.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/js/src/util.js b/js/src/util.js index c20678fe0f..e5521438e2 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 } |