perf(core): no need for batchUpdated if no selector (#9121)

This commit is contained in:
Martin Guillon
2021-01-29 21:19:15 +01:00
committed by GitHub
parent 28061e3d39
commit 3a14a0a760

View File

@ -472,6 +472,9 @@ export class CssState {
}
const matchingSelectors = this._match.selectors.filter((sel) => (sel.dynamic ? sel.match(view) : true));
if (!matchingSelectors || matchingSelectors.length === 0) {
return;
}
view._batchUpdate(() => {
this.stopKeyframeAnimations();
this.setPropertyValues(matchingSelectors);