mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
fix iOS back transition after hmr
This commit is contained in:
@ -140,10 +140,12 @@ class UIViewControllerImpl extends UIViewController {
|
|||||||
if (!owner._presentedViewController && frame) {
|
if (!owner._presentedViewController && frame) {
|
||||||
const newEntry: BackstackEntry = this[ENTRY];
|
const newEntry: BackstackEntry = this[ENTRY];
|
||||||
|
|
||||||
frame.setCurrent(newEntry);
|
// frame.setCurrent(...) will reset executing context so retrieve it here
|
||||||
|
|
||||||
const navigationContext = frame._executingContext || { navigationType: NavigationType.unset };
|
const navigationContext = frame._executingContext || { navigationType: NavigationType.unset };
|
||||||
const isReplace = navigationContext.navigationType === NavigationType.replace;
|
const isReplace = navigationContext.navigationType === NavigationType.replace;
|
||||||
|
|
||||||
|
frame.setCurrent(newEntry);
|
||||||
|
|
||||||
if (isReplace) {
|
if (isReplace) {
|
||||||
let controller = newEntry.resolvedPage.ios;
|
let controller = newEntry.resolvedPage.ios;
|
||||||
if (controller) {
|
if (controller) {
|
||||||
|
Reference in New Issue
Block a user