-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
When some specific element have few classes in the selector, then optimization cause an error.
For example,
Let's say that full path looks like that: .first-elem >.second-elem.another-class >.last-elem
When optimizePart called with following arguments:
prePart = .someSelector
current = >.second-elem.another-class
postPart = > .last-elem
So when class optimisation starts to work
optimal-select/src/optimize.js
Line 125 in 722d220
| if (/\.\S+\.\S+/.test(current)) { |
Let's say it removes part .second-elem from the selector and full selector still works fine, then it tries to remove the second class too, which creates incorrect selector like that: .first-elem > >.last-elem which cause an error when calling this line
optimal-select/src/optimize.js
Line 135 in 722d220
| var matches = document.querySelectorAll(pattern) |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels