inertiax-core 11.0.28 → 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));
@@ -2723,6 +2725,10 @@ var Response = class _Response {
2723
2725
  if (typeof window === "undefined") {
2724
2726
  return;
2725
2727
  }
2728
+ if (this.requestParams.all().frameId !== "_top") {
2729
+ window.location.reload();
2730
+ return;
2731
+ }
2726
2732
  if (isSameUrlWithoutHash(window.location, url)) {
2727
2733
  window.location.reload();
2728
2734
  } else {