@inertiajs/core 2.2.16 → 2.2.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.esm.js +13 -1
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +13 -1
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/types/objectUtils.d.ts +1 -1
- package/types/types.d.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -87,7 +87,8 @@ var Config = class {
|
|
|
87
87
|
};
|
|
88
88
|
var config = new Config({
|
|
89
89
|
form: {
|
|
90
|
-
recentlySuccessfulDuration: 2e3
|
|
90
|
+
recentlySuccessfulDuration: 2e3,
|
|
91
|
+
forceIndicesArrayFormatInFormData: true
|
|
91
92
|
},
|
|
92
93
|
future: {
|
|
93
94
|
preserveEqualProps: false,
|
|
@@ -456,6 +457,9 @@ function hrefToUrl(href) {
|
|
|
456
457
|
var transformUrlAndData = (href, data, method, forceFormData, queryStringArrayFormat) => {
|
|
457
458
|
let url = typeof href === "string" ? hrefToUrl(href) : href;
|
|
458
459
|
if ((hasFiles(data) || forceFormData) && !isFormData(data)) {
|
|
460
|
+
if (config.get("form.forceIndicesArrayFormatInFormData")) {
|
|
461
|
+
queryStringArrayFormat = "indices";
|
|
462
|
+
}
|
|
459
463
|
data = objectToFormData(data, new FormData(), null, queryStringArrayFormat);
|
|
460
464
|
}
|
|
461
465
|
if (isFormData(data)) {
|
|
@@ -1150,6 +1154,14 @@ var objectsAreEqual = (obj1, obj2, excludeKeys) => {
|
|
|
1150
1154
|
return false;
|
|
1151
1155
|
}
|
|
1152
1156
|
}
|
|
1157
|
+
for (const key in obj2) {
|
|
1158
|
+
if (excludeKeys.includes(key)) {
|
|
1159
|
+
continue;
|
|
1160
|
+
}
|
|
1161
|
+
if (!(key in obj1)) {
|
|
1162
|
+
return false;
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1153
1165
|
return true;
|
|
1154
1166
|
};
|
|
1155
1167
|
var compareValues = (value1, value2) => {
|