mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-26 21:39:08 +02:00
Throw error about Popper.js only when it's needed because some of our plugins don't use it (#24573)
This commit is contained in:
@@ -12,15 +12,6 @@ import Util from './util'
|
||||
|
||||
const Tooltip = (($) => {
|
||||
|
||||
/**
|
||||
* Check for Popper dependency
|
||||
* Popper - https://popper.js.org
|
||||
*/
|
||||
if (typeof Popper === 'undefined') {
|
||||
throw new Error('Bootstrap tooltips require Popper.js (https://popper.js.org)')
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
@@ -120,6 +111,13 @@ const Tooltip = (($) => {
|
||||
class Tooltip {
|
||||
|
||||
constructor(element, config) {
|
||||
/**
|
||||
* Check for Popper dependency
|
||||
* Popper - https://popper.js.org
|
||||
*/
|
||||
if (typeof Popper === 'undefined') {
|
||||
throw new Error('Bootstrap tooltips require Popper.js (https://popper.js.org)')
|
||||
}
|
||||
|
||||
// private
|
||||
this._isEnabled = true
|
||||
|
Reference in New Issue
Block a user