2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-27 14:46:01 +03:00

Add throw error for undefined method on plugins

This commit is contained in:
Johann-S
2015-09-16 10:35:29 +02:00
parent c34fdd415e
commit 21a65f181e
16 changed files with 121 additions and 4 deletions
+3
View File
@@ -622,6 +622,9 @@ const Tooltip = (($) => {
}
if (typeof config === 'string') {
if (data[config] === undefined) {
throw new Error(`No method named "${config}"`)
}
data[config]()
}
})