mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
Revert "Fix: Trying to clear inherited props after the view has been detached throws"
This reverts commit f64f74fb7b61d16fc7c6624b7d9e02bb430b3197.
This commit is contained in:
@ -424,7 +424,6 @@ export class ViewBase extends Observable implements ViewBaseDefinition {
|
|||||||
throw new Error("View not added to this instance. View: " + view + " CurrentParent: " + view.parent + " ExpectedParent: " + this);
|
throw new Error("View not added to this instance. View: " + view + " CurrentParent: " + view.parent + " ExpectedParent: " + this);
|
||||||
}
|
}
|
||||||
|
|
||||||
clearInheritedProperties(view);
|
|
||||||
this._removeViewCore(view);
|
this._removeViewCore(view);
|
||||||
view.parent = undefined;
|
view.parent = undefined;
|
||||||
view._parentChanged(this);
|
view._parentChanged(this);
|
||||||
@ -474,6 +473,10 @@ export class ViewBase extends Observable implements ViewBaseDefinition {
|
|||||||
|
|
||||||
public _parentChanged(oldParent: ViewBase): void {
|
public _parentChanged(oldParent: ViewBase): void {
|
||||||
//Overridden
|
//Overridden
|
||||||
|
if (oldParent) {
|
||||||
|
// Move these method in property class.
|
||||||
|
clearInheritedProperties(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _registerAnimation(animation: KeyframeAnimation) {
|
public _registerAnimation(animation: KeyframeAnimation) {
|
||||||
|
Reference in New Issue
Block a user