From 4c15f717898a5764631211ad59bbe9f9197fdc12 Mon Sep 17 00:00:00 2001 From: Vasil Chimev Date: Thu, 6 Dec 2018 14:57:15 +0200 Subject: [PATCH] fix: iOS tests --- tns-core-modules/ui/styling/style-scope.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tns-core-modules/ui/styling/style-scope.ts b/tns-core-modules/ui/styling/style-scope.ts index c49bc5e35..a915b559d 100644 --- a/tns-core-modules/ui/styling/style-scope.ts +++ b/tns-core-modules/ui/styling/style-scope.ts @@ -386,8 +386,12 @@ export class CssState { @profile private updateMatch() { - this._appliedSelectorsVersion = this.view._styleScope._getSelectorsVersion(); - this._match = this.view._styleScope ? this.view._styleScope.matchSelectors(this.view) : CssState.emptyMatch; + if (this.view._styleScope) { + this._appliedSelectorsVersion = this.view._styleScope._getSelectorsVersion(); + this._match = this.view._styleScope.matchSelectors(this.view); + } else { + this._match = CssState.emptyMatch; + } this._matchInvalid = false; }