mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00
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
This commit is contained in:

committed by
Manol Donev

parent
25f4b562a0
commit
19dfd163e0
@ -177,7 +177,7 @@ class UIViewControllerImpl extends UIViewController {
|
||||
// or because we are closing a modal page,
|
||||
// or because we are in tab and another controller is selected.
|
||||
const tab = this.tabBarController;
|
||||
if (!owner._presentedViewController && !this.presentingViewController && frame && frame.currentPage === owner) {
|
||||
if (owner.onNavigatingFrom && !owner._presentedViewController && !this.presentingViewController && frame && frame.currentPage === owner) {
|
||||
const willSelectViewController = tab && (<any>tab)._willSelectViewController;
|
||||
if (!willSelectViewController
|
||||
|| willSelectViewController === tab.selectedViewController) {
|
||||
|
Reference in New Issue
Block a user