aboutsummaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authorMichael J. Ryan <[email protected]>2016-03-14 13:18:08 -0700
committerMichael J. Ryan <[email protected]>2016-03-14 13:18:08 -0700
commit1a23279237b5360dab15d91aac85cbf8306e560a (patch)
tree7883c67a19142d8cdec556a59491c82524154808 /js/src
parent5f959f119242565460ae07d0eaff8ed8274c22f1 (diff)
downloadbootstrap-1a23279237b5360dab15d91aac85cbf8306e560a.tar.xz
bootstrap-1a23279237b5360dab15d91aac85cbf8306e560a.zip
Update tooltip.js
Don't reference `Tether` via attachment to `window`, with the update one can import bootstrap providing the dependencies in webpack with: ``` new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery', Tether: 'tether', }); ``` Then inside one's own bootstrap/globals, `import 'bootstrap';` will simply work, and $/jQuery can be used from there. I had wanted to do this, but also expose jQuery, Tether, etc when in development build in my code, but if I provide `window.Tether`, I can't then expose it to the outside...
Diffstat (limited to 'js/src')
-rw-r--r--js/src/tooltip.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js
index 77803dc40..03d9e4cc8 100644
--- a/js/src/tooltip.js
+++ b/js/src/tooltip.js
@@ -16,7 +16,7 @@ const Tooltip = (($) => {
* Check for Tether dependency
* Tether - http://github.hubspot.com/tether/
*/
- if (window.Tether === undefined) {
+ if ('undefined' === typeof Tether) {
throw new Error('Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)')
}