fix(ios): prevent views from being measured if no native view (#9511)

This commit is contained in:
farfromrefuge
2021-08-19 02:48:53 +02:00
committed by Nathan Walker
parent 8c9407c48e
commit b4dc45edb3

View File

@ -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;