1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-06 05:37:39 +02:00

Selector Engine: fix multiple IDs (#39201)

* fix: regression of #38989

* Add unit test in selector-engine.spec.js

---------

Co-authored-by: Julien Déramond <juderamond@gmail.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
GeoSot
2024-02-18 08:58:07 +02:00
committed by GitHub
parent 1bc85bfe2b
commit 6ed1cdd43e
3 changed files with 43 additions and 2 deletions

View File

@@ -26,10 +26,10 @@ const getSelector = element => {
hrefAttribute = `#${hrefAttribute.split('#')[1]}`
}
selector = hrefAttribute && hrefAttribute !== '#' ? parseSelector(hrefAttribute.trim()) : null
selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null
}
return selector
return selector ? selector.split(',').map(sel => parseSelector(sel)).join(',') : null
}
const SelectorEngine = {