From 4e97e71da29d4642c9310b366bfc98ba16ca4d84 Mon Sep 17 00:00:00 2001 From: Martin Guillon Date: Mon, 16 Aug 2021 14:36:27 +0200 Subject: [PATCH] fix(core): prevent iOS views to be measured if no native view This should not happen but it does. Did not manage to find the real source but it seems ok to test it here. Plus if it happens the measurement chain for that view will be broken --- packages/core/ui/core/view/index.ios.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/ui/core/view/index.ios.ts b/packages/core/ui/core/view/index.ios.ts index ff78cd301..7485818aa 100644 --- a/packages/core/ui/core/view/index.ios.ts +++ b/packages/core/ui/core/view/index.ios.ts @@ -92,7 +92,7 @@ export class View extends ViewCommon implements ViewDefinition { public measure(widthMeasureSpec: number, heightMeasureSpec: number): void { const measureSpecsChanged = this._setCurrentMeasureSpecs(widthMeasureSpec, heightMeasureSpec); const forceLayout = (this._privateFlags & PFLAG_FORCE_LAYOUT) === PFLAG_FORCE_LAYOUT; - if (forceLayout || measureSpecsChanged) { + if (this.nativeViewProtected && (forceLayout || measureSpecsChanged)) { // first clears the measured dimension flag this._privateFlags &= ~PFLAG_MEASURED_DIMENSION_SET;