diff options
| author | Chris Rebert <[email protected]> | 2015-10-02 01:18:16 -0700 |
|---|---|---|
| committer | Chris Rebert <[email protected]> | 2015-10-02 01:18:16 -0700 |
| commit | 10f6e97ec2c59cbeb3c892936e8b7cb3faa1e247 (patch) | |
| tree | deb94d828c341c1cfe61cf0435bb2f2d21836a21 /js/src/tooltip.js | |
| parent | a89bfc65252f648469e84242289b8a45a49d08e9 (diff) | |
| parent | 21a65f181eebc3f2c0cd43fb3383ee3de673745b (diff) | |
| download | bootstrap-10f6e97ec2c59cbeb3c892936e8b7cb3faa1e247.tar.xz bootstrap-10f6e97ec2c59cbeb3c892936e8b7cb3faa1e247.zip | |
Merge pull request #17616 from Johann-S/ThrowError
Fix #17612: Throw explicit error when a nonexistent method is invoked
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]() } }) |
