From 6a60b83d49a9daa3825f9ee340d61b55ba4b85ff Mon Sep 17 00:00:00 2001 From: farfromrefuge Date: Sat, 5 Mar 2022 04:49:52 +0100 Subject: [PATCH] fix: ensure we clear ios view in _tearDownUI (#9671) This had side effects for example: https://github.com/NativeScript/NativeScript/issues/7469. --- packages/core/ui/core/view-base/index.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/core/ui/core/view-base/index.ts b/packages/core/ui/core/view-base/index.ts index efca848ce..557bdb3a3 100644 --- a/packages/core/ui/core/view-base/index.ts +++ b/packages/core/ui/core/view-base/index.ts @@ -958,12 +958,9 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition this._suspendNativeUpdates(SuspendType.UISetup); - if (global.isAndroid) { - this.setNativeView(null); - this._androidView = null; - } - - // this._iosView = null; + this.setNativeView(null); + this._androidView = null; + this._iosView = null; this._context = null; }