mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
fix(core): trace instead of throw
This commit is contained in:
@ -88,10 +88,12 @@ export class View extends ViewCommon implements ViewDefinition {
|
|||||||
this.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
this.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||||
this._privateFlags |= PFLAG_LAYOUT_REQUIRED;
|
this._privateFlags |= PFLAG_LAYOUT_REQUIRED;
|
||||||
|
|
||||||
// flag not set, setMeasuredDimension() was not invoked, we raise
|
// flag not set, setMeasuredDimension() was not invoked, we trace
|
||||||
// an exception to warn the developer
|
// the exception to warn the developer
|
||||||
if ((this._privateFlags & PFLAG_MEASURED_DIMENSION_SET) !== PFLAG_MEASURED_DIMENSION_SET) {
|
if ((this._privateFlags & PFLAG_MEASURED_DIMENSION_SET) !== PFLAG_MEASURED_DIMENSION_SET) {
|
||||||
throw new Error('onMeasure() did not set the measured dimension by calling setMeasuredDimension() ' + this);
|
if (Trace.isEnabled()) {
|
||||||
|
Trace.write('onMeasure() did not set the measured dimension by calling setMeasuredDimension() ' + this, Trace.categories.Layout, Trace.messageType.error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user