Perf: don't run the regex replace unless the selectorText contains a colon (#1280)

* Perf: don't run the regex replace unless the selectorText contains a colon (rules generally contain colons)

* Need to check type before querying selectorText property - also good as it means we only try to fix colons at the leaf level
---------

Authored-by: eoghan murray <eoghan@getthere.ie>
This commit is contained in:
Eoghan Murray
2023-08-14 12:43:34 +01:00
committed by GitHub
parent f1b8e855b1
commit 64420c7e46
4 changed files with 18 additions and 26 deletions

View File

@@ -22,7 +22,6 @@ import {
stringifyStylesheet,
getInputType,
toLowerCase,
validateStringifiedCssRule,
} from './utils';
let _id = 1;