aboutsummaryrefslogtreecommitdiff
path: root/js/src/dropdown.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/dropdown.js')
-rw-r--r--js/src/dropdown.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/js/src/dropdown.js b/js/src/dropdown.js
index 734e64312..f947d2aa1 100644
--- a/js/src/dropdown.js
+++ b/js/src/dropdown.js
@@ -143,6 +143,9 @@ const Dropdown = (($) => {
}
if (typeof config === 'string') {
+ if (data[config] === undefined) {
+ throw new Error(`No method named "${config}"`)
+ }
data[config].call(this)
}
})