Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann-S <johann.servoire@gmail.com>2017-10-30 01:51:04 +0300
committerMark Otto <markd.otto@gmail.com>2017-10-30 01:51:04 +0300
commit2232b6b4d140cf8a01314deb7e4779c7fde8ab05 (patch)
tree7c3d0ec4a290b48b5d7d541247a0e6203a988776 /js/src/tooltip.js
parente454c8ec1e5197d959baf48fb089719bf900fb2a (diff)
Throw error about Popper.js only when it's needed because some of our plugins don't use it (#24573)
Diffstat (limited to 'js/src/tooltip.js')
-rw-r--r--js/src/tooltip.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js
index a3fc93c913..7cefd0be6a 100644
--- a/js/src/tooltip.js
+++ b/js/src/tooltip.js
@@ -13,15 +13,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