inertiax-core 11.0.29 → 11.0.30

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 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 doPush = () => this.doPushState({ page: data }, browserUrl ?? page2.url, frameId).then(() => cb?.());
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 doReplace = () => this.doReplaceState({ page: data }, browserUrl ?? page2.url, frameId).then(() => cb?.());
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));