From 1c85549ed3acbb6eb93bab3d866f046f308c65e4 Mon Sep 17 00:00:00 2001 From: Martin Guillon Date: Mon, 7 Dec 2020 13:28:24 +0100 Subject: [PATCH] fix: no need for batchUdated if no selector --- packages/core/ui/styling/style-scope.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/ui/styling/style-scope.ts b/packages/core/ui/styling/style-scope.ts index 20303ffa9..afc949d56 100644 --- a/packages/core/ui/styling/style-scope.ts +++ b/packages/core/ui/styling/style-scope.ts @@ -473,6 +473,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);