fixup b41cc8bc: only rewrite query if regexp

This commit is contained in:
tophf 2017-12-01 16:16:24 +03:00
parent bf8d33a3f4
commit 2760b0764b

View File

@ -131,7 +131,9 @@
}
function matchesOnScrollbar(query, ...args) {
if (query instanceof RegExp) {
query = new RegExp(/(?:^|[^\w.#\\-])/.source + query.source.slice(2, -2) + /(?:[^\w.#\\-]|$)/.source);
}
return originalMatchesOnScrollbar.call(this, query, ...args);
}
})();