@inertiajs/core 2.2.17 → 2.2.19

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.esm.js CHANGED
@@ -295,6 +295,10 @@ var Scroll = class {
295
295
  }
296
296
  });
297
297
  this.save();
298
+ this.scrollToAnchor();
299
+ }
300
+ static scrollToAnchor() {
301
+ const anchorHash = typeof window !== "undefined" ? window.location.hash : null;
298
302
  if (anchorHash) {
299
303
  setTimeout(() => {
300
304
  const anchorElement = document.getElementById(anchorHash.slice(1));
@@ -1000,6 +1004,8 @@ var InitialVisit = class {
1000
1004
  page.set(page.get(), { preserveScroll: true, preserveState: true }).then(() => {
1001
1005
  if (navigationType.isReload()) {
1002
1006
  Scroll.restore(history.getScrollRegions());
1007
+ } else {
1008
+ Scroll.scrollToAnchor();
1003
1009
  }
1004
1010
  fireNavigateEvent(page.get());
1005
1011
  });
@@ -1099,6 +1105,14 @@ var objectsAreEqual = (obj1, obj2, excludeKeys) => {
1099
1105
  return false;
1100
1106
  }
1101
1107
  }
1108
+ for (const key in obj2) {
1109
+ if (excludeKeys.includes(key)) {
1110
+ continue;
1111
+ }
1112
+ if (!(key in obj1)) {
1113
+ return false;
1114
+ }
1115
+ }
1102
1116
  return true;
1103
1117
  };
1104
1118
  var compareValues = (value1, value2) => {