Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions js/src/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,21 @@ import Util from './util'
* --------------------------------------------------------------------------
*/

const Tooltip = (($) => {
let _Tether
// Webpack workaround
try {
_Tether = Tether
} catch (exc) {
_Tether = window.Tether
}

const Tooltip = (($, Tether) => {

/**
* Check for Tether dependency
* Tether - http://tether.io/
*/
if (window.Tether === undefined) {
if (Tether === undefined) {
throw new Error('Bootstrap tooltips require Tether (http://tether.io/)')
}

Expand Down Expand Up @@ -646,6 +654,6 @@ const Tooltip = (($) => {

return Tooltip

})(jQuery)
})(jQuery, _Tether)

export default Tooltip