Fix regression in reverse lookup of cosmetic filters

Related commit:
- d1715fb19f
This commit is contained in:
Raymond Hill 2020-07-04 10:11:53 -04:00
parent 5e949981e0
commit 000886002d
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -126,7 +126,7 @@ const fromCosmeticFilter = function(details) {
// The longer the needle, the lower the number of false positives.
// https://github.com/uBlockOrigin/uBlock-issues/issues/1139
// Mind that there is no guarantee a selector has `\w` characters.
const needle = selector.match(/\w+|^.*$/g).reduce(function(a, b) {
const needle = selector.match(/\w+|\*/g).reduce(function(a, b) {
return a.length > b.length ? a : b;
});