inertiax-core 11.0.29 → 11.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +15 -8
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -369,7 +369,8 @@ var History = class {
|
|
|
369
369
|
this.setCurrentState(page2, frameId);
|
|
370
370
|
queue.add(() => {
|
|
371
371
|
return this.getPageData(page2).then((data) => {
|
|
372
|
-
const
|
|
372
|
+
const fallbackUrl = frameId === DEFAULT_FRAME_ID ? page2.url : window.location.href;
|
|
373
|
+
const doPush = () => this.doPushState({ page: data }, browserUrl ?? fallbackUrl, frameId).then(() => cb?.());
|
|
373
374
|
if (isChromeIOS) {
|
|
374
375
|
return new Promise((resolve) => {
|
|
375
376
|
setTimeout(() => doPush().then(resolve));
|
|
@@ -468,7 +469,8 @@ var History = class {
|
|
|
468
469
|
this.setCurrentState(page2, frameId);
|
|
469
470
|
queue.add(() => {
|
|
470
471
|
return this.getPageData(page2).then((data) => {
|
|
471
|
-
const
|
|
472
|
+
const fallbackUrl = frameId === DEFAULT_FRAME_ID ? page2.url : window.location.href;
|
|
473
|
+
const doReplace = () => this.doReplaceState({ page: data }, browserUrl ?? fallbackUrl, frameId).then(() => cb?.());
|
|
472
474
|
if (isChromeIOS) {
|
|
473
475
|
return new Promise((resolve) => {
|
|
474
476
|
setTimeout(() => doReplace().then(resolve));
|
|
@@ -1378,7 +1380,16 @@ var CurrentFramePage = class {
|
|
|
1378
1380
|
resolveComponent,
|
|
1379
1381
|
onFlash
|
|
1380
1382
|
}) {
|
|
1381
|
-
|
|
1383
|
+
const prevRemembered = this.page?.rememberedState ?? {};
|
|
1384
|
+
this.page = {
|
|
1385
|
+
...initialPage,
|
|
1386
|
+
flash: initialPage.flash ?? {},
|
|
1387
|
+
rescuedProps: initialPage.rescuedProps ?? [],
|
|
1388
|
+
rememberedState: {
|
|
1389
|
+
...prevRemembered,
|
|
1390
|
+
...initialPage.rememberedState ?? {}
|
|
1391
|
+
}
|
|
1392
|
+
};
|
|
1382
1393
|
this.swapComponent = swapComponent;
|
|
1383
1394
|
this.resolveComponent = resolveComponent;
|
|
1384
1395
|
this.onFlashCallback = onFlash;
|
|
@@ -1417,7 +1428,7 @@ var CurrentFramePage = class {
|
|
|
1417
1428
|
if (componentId !== this.componentId) {
|
|
1418
1429
|
return;
|
|
1419
1430
|
}
|
|
1420
|
-
page2.rememberedState
|
|
1431
|
+
page2.rememberedState = { ...this.page?.rememberedState ?? {}, ...page2.rememberedState ?? {} };
|
|
1421
1432
|
const isServer3 = typeof window === "undefined";
|
|
1422
1433
|
const location = !isServer3 ? window.location : new URL(page2.url);
|
|
1423
1434
|
const currentFrameUrl = hrefToUrl(this.page?.url ?? page2.url);
|
|
@@ -3390,10 +3401,6 @@ var Router = class {
|
|
|
3390
3401
|
this.removePageshowHandler?.();
|
|
3391
3402
|
this.removePopstateHandler = void 0;
|
|
3392
3403
|
this.removePageshowHandler = void 0;
|
|
3393
|
-
if (this.frameId !== "_top") {
|
|
3394
|
-
page.deleteFrame(this.frameId);
|
|
3395
|
-
history.deleteFrame(this.frameId);
|
|
3396
|
-
}
|
|
3397
3404
|
}
|
|
3398
3405
|
poll(interval, requestOptions = {}, options = {}) {
|
|
3399
3406
|
return polls.add(
|