@inertiajs/core 2.2.16 → 2.2.17
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 +5 -1
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +5 -1
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/types/types.d.ts +1 -0
package/dist/index.esm.js
CHANGED
|
@@ -32,7 +32,8 @@ var Config = class {
|
|
|
32
32
|
};
|
|
33
33
|
var config = new Config({
|
|
34
34
|
form: {
|
|
35
|
-
recentlySuccessfulDuration: 2e3
|
|
35
|
+
recentlySuccessfulDuration: 2e3,
|
|
36
|
+
forceIndicesArrayFormatInFormData: true
|
|
36
37
|
},
|
|
37
38
|
future: {
|
|
38
39
|
preserveEqualProps: false,
|
|
@@ -401,6 +402,9 @@ function hrefToUrl(href) {
|
|
|
401
402
|
var transformUrlAndData = (href, data, method, forceFormData, queryStringArrayFormat) => {
|
|
402
403
|
let url = typeof href === "string" ? hrefToUrl(href) : href;
|
|
403
404
|
if ((hasFiles(data) || forceFormData) && !isFormData(data)) {
|
|
405
|
+
if (config.get("form.forceIndicesArrayFormatInFormData")) {
|
|
406
|
+
queryStringArrayFormat = "indices";
|
|
407
|
+
}
|
|
404
408
|
data = objectToFormData(data, new FormData(), null, queryStringArrayFormat);
|
|
405
409
|
}
|
|
406
410
|
if (isFormData(data)) {
|