@inertiajs/core 2.3.17 → 2.3.18

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
@@ -1117,7 +1117,7 @@ var CurrentPage = class {
1117
1117
  viewTransition
1118
1118
  }) {
1119
1119
  const doSwap = () => this.swapComponent({ component, page: page2, preserveState });
1120
- if (!viewTransition || !document?.startViewTransition) {
1120
+ if (!viewTransition || !document?.startViewTransition || document.visibilityState === "hidden") {
1121
1121
  return doSwap();
1122
1122
  }
1123
1123
  const viewTransitionCallback = typeof viewTransition === "boolean" ? () => null : viewTransition;
@@ -1972,7 +1972,6 @@ var Response = class _Response {
1972
1972
  }
1973
1973
  await history.processQueue();
1974
1974
  history.preserveUrl = this.requestParams.all().preserveUrl;
1975
- const previousFlash = page.get().flash;
1976
1975
  await this.setPage();
1977
1976
  const errors = page.get().props.errors || {};
1978
1977
  if (Object.keys(errors).length > 0) {
@@ -1985,7 +1984,7 @@ var Response = class _Response {
1985
1984
  router.flush(page.get().url);
1986
1985
  }
1987
1986
  const { flash } = page.get();
1988
- if (Object.keys(flash).length > 0 && (!this.requestParams.isPartial() || !(0, import_lodash_es4.isEqual)(flash, previousFlash))) {
1987
+ if (Object.keys(flash).length > 0 && !this.requestParams.isDeferredPropsRequest()) {
1989
1988
  fireFlashEvent(flash);
1990
1989
  this.requestParams.all().onFlash(flash);
1991
1990
  }
@@ -2374,7 +2373,7 @@ var RequestStream = class {
2374
2373
  }
2375
2374
  send(request) {
2376
2375
  this.requests.push(request);
2377
- request.send().then(() => {
2376
+ request.send().finally(() => {
2378
2377
  this.requests = this.requests.filter((r) => r !== request);
2379
2378
  });
2380
2379
  }