mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-05 16:42:29 +03: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:
+7
-9
@@ -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