@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.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)) {