diff options
| author | Johann-S <[email protected]> | 2015-09-16 10:35:29 +0200 |
|---|---|---|
| committer | Johann-S <[email protected]> | 2015-10-02 10:01:24 +0200 |
| commit | 21a65f181eebc3f2c0cd43fb3383ee3de673745b (patch) | |
| tree | 72a1c5e6da10a3dd7c918e05d0eff6a4d8e0c0aa /js/src/tooltip.js | |
| parent | c34fdd415e864e5e6a64f36a0278b5d43c15d3a2 (diff) | |
| download | bootstrap-21a65f181eebc3f2c0cd43fb3383ee3de673745b.tar.xz bootstrap-21a65f181eebc3f2c0cd43fb3383ee3de673745b.zip | |
Add throw error for undefined method on plugins
Diffstat (limited to 'js/src/tooltip.js')
| -rw-r--r-- | js/src/tooltip.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 151cd6f51..b80bd8e8c 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -622,6 +622,9 @@ const Tooltip = (($) => { } if (typeof config === 'string') { + if (data[config] === undefined) { + throw new Error(`No method named "${config}"`) + } data[config]() } }) |
