diff options
Diffstat (limited to 'js/src/util')
| -rw-r--r-- | js/src/util/index.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/js/src/util/index.js b/js/src/util/index.js index a5144f15e..0dd6b1d45 100644 --- a/js/src/util/index.js +++ b/js/src/util/index.js @@ -214,11 +214,12 @@ const onDOMContentLoaded = callback => { const isRTL = () => document.documentElement.dir === 'rtl' -const defineJQueryPlugin = (name, plugin) => { +const defineJQueryPlugin = plugin => { onDOMContentLoaded(() => { const $ = getjQuery() /* istanbul ignore if */ if ($) { + const name = plugin.NAME const JQUERY_NO_CONFLICT = $.fn[name] $.fn[name] = plugin.jQueryInterface $.fn[name].Constructor = plugin |
