diff --git a/tns-core-modules/ui/core/view/view.android.ts b/tns-core-modules/ui/core/view/view.android.ts index ffb9db963..40dff4514 100644 --- a/tns-core-modules/ui/core/view/view.android.ts +++ b/tns-core-modules/ui/core/view/view.android.ts @@ -497,7 +497,7 @@ export class View extends ViewCommon { public getLocationRelativeTo(otherView: ViewCommon): Point { if (!this.nativeViewProtected || !this.nativeViewProtected.getWindowToken() || - !otherView.nativeViewProtected || !otherView.nativeViewProtected.getWindowToken() || + !otherView || !otherView.nativeViewProtected || !otherView.nativeViewProtected.getWindowToken() || this.nativeViewProtected.getWindowToken() !== otherView.nativeViewProtected.getWindowToken()) { return undefined; } diff --git a/tns-core-modules/ui/frame/frame.android.ts b/tns-core-modules/ui/frame/frame.android.ts index 15d55962c..7b2009183 100644 --- a/tns-core-modules/ui/frame/frame.android.ts +++ b/tns-core-modules/ui/frame/frame.android.ts @@ -143,7 +143,7 @@ export class Frame extends FrameBase { // In this case call _navigateCore in order to recreate the current fragment. // Don't call navigate because it will fire navigation events. // As JS instances are alive it is already done for the current page. - if (!this.isLoaded || !this._attachedToWindow) { + if (!this.isLoaded || this._executingEntry || !this._attachedToWindow) { return; }