mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-05-30 15:24:08 +03:00
enforce element check on scrollspy target
This commit is contained in:
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user