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:
@@ -234,6 +234,9 @@ const Tab = (($) => {
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (data[config] === undefined) {
|
||||
throw new Error(`No method named "${config}"`)
|
||||
}
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user