From 28d7240cc58b070ffc874451532817e4065d04cf Mon Sep 17 00:00:00 2001 From: Manol Donev Date: Tue, 25 Jun 2019 18:00:04 +0300 Subject: [PATCH] chore: tslint errors --- tns-core-modules/ui/styling/style-properties.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tns-core-modules/ui/styling/style-properties.ts b/tns-core-modules/ui/styling/style-properties.ts index cb09f3cb1..6a1c9bae7 100644 --- a/tns-core-modules/ui/styling/style-properties.ts +++ b/tns-core-modules/ui/styling/style-properties.ts @@ -219,7 +219,10 @@ export const widthProperty = new CssAnimationProperty({ // on the animation property, so fake it here. x_x valueChanged: (target, oldValue, newValue) => { if (isIOS) { - target.view.requestLayout(); + const view = target.viewRef.get(); + if (view) { + view.requestLayout(); + } } }, valueConverter: PercentLength.parse }); widthProperty.register(Style); @@ -230,7 +233,10 @@ export const heightProperty = new CssAnimationProperty({ // on the animation property, so fake it here. -_- valueChanged: (target, oldValue, newValue) => { if (isIOS) { - target.view.requestLayout(); + const view = target.viewRef.get(); + if (view) { + view.requestLayout(); + } } }, valueConverter: PercentLength.parse,