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