2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-30 15:24:08 +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
@@ -234,6 +234,9 @@ const Tab = (($) => {
}
if (typeof config === 'string') {
if (data[config] === undefined) {
throw new Error(`No method named "${config}"`)
}
data[config]()
}
})