diff options
| author | Johann-S <[email protected]> | 2020-05-05 21:42:58 +0200 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2020-05-07 09:31:49 +0300 |
| commit | 22f75ca2e328ad232dd2afafd15dc0c79a908410 (patch) | |
| tree | e57daf36c9e278da5f108353e5d4000a3b2b5d53 /js/src | |
| parent | 5f267b1854d9fd1843ca225dc2a529f9912b4a6f (diff) | |
| download | bootstrap-22f75ca2e328ad232dd2afafd15dc0c79a908410.tar.xz bootstrap-22f75ca2e328ad232dd2afafd15dc0c79a908410.zip | |
enforce element check on scrollspy target
Diffstat (limited to 'js/src')
| -rw-r--r-- | js/src/scrollspy.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js index 2c7c8a1dc..bf546a258 100644 --- a/js/src/scrollspy.js +++ b/js/src/scrollspy.js @@ -157,7 +157,7 @@ class ScrollSpy { ...typeof config === 'object' && config ? config : {} } - if (typeof config.target !== 'string') { + if (typeof config.target !== 'string' && Util.isElement(config.target)) { let id = $(config.target).attr('id') if (!id) { id = Util.getUID(NAME) |
