@inertiajs/core 2.2.11 → 2.2.12
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 +19 -7
- package/dist/index.esm.js.map +3 -3
- package/dist/index.js +13 -1
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/types/history.d.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -712,9 +712,21 @@ var History = class {
|
|
|
712
712
|
});
|
|
713
713
|
});
|
|
714
714
|
}
|
|
715
|
+
clonePageProps(page2) {
|
|
716
|
+
try {
|
|
717
|
+
structuredClone(page2.props);
|
|
718
|
+
return page2;
|
|
719
|
+
} catch {
|
|
720
|
+
return {
|
|
721
|
+
...page2,
|
|
722
|
+
props: (0, import_lodash_es2.cloneDeep)(page2.props)
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
}
|
|
715
726
|
getPageData(page2) {
|
|
727
|
+
const pageWithClonedProps = this.clonePageProps(page2);
|
|
716
728
|
return new Promise((resolve) => {
|
|
717
|
-
return page2.encryptHistory ? encryptHistory(
|
|
729
|
+
return page2.encryptHistory ? encryptHistory(pageWithClonedProps).then(resolve) : resolve(pageWithClonedProps);
|
|
718
730
|
});
|
|
719
731
|
}
|
|
720
732
|
processQueue() {
|