Skip to content

Commit 19dfd16

Browse files
grgurmanoldonev
authored andcommitted
fix: call onNavigatingFrom event only if it exists (#6773)
I ran into an issue where `owner.onNavigatingFrom` didn't exist when rendering a view was blocked by the biometric scanner and then user hit the back button to navigate back. This code simply adds a check to see if `onNavigatingFrom` exists on the owner
1 parent 25f4b56 commit 19dfd16

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tns-core-modules/ui/page/page.ios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class UIViewControllerImpl extends UIViewController {
177177
// or because we are closing a modal page,
178178
// or because we are in tab and another controller is selected.
179179
const tab = this.tabBarController;
180-
if (!owner._presentedViewController && !this.presentingViewController && frame && frame.currentPage === owner) {
180+
if (owner.onNavigatingFrom && !owner._presentedViewController && !this.presentingViewController && frame && frame.currentPage === owner) {
181181
const willSelectViewController = tab && (<any>tab)._willSelectViewController;
182182
if (!willSelectViewController
183183
|| willSelectViewController === tab.selectedViewController) {

0 commit comments

Comments
 (0)