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