Skip to content

Commit

Permalink
Only process arrays when they are keyed
Browse files Browse the repository at this point in the history
  • Loading branch information
bennothommo committed Aug 13, 2024
1 parent 047ea65 commit c7ebcb8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/system/assets/js/build/system.debug.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/system/assets/js/build/system.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/system/assets/js/snowboard/ajax/Request.js
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ export default class Request extends PluginBase {
return;
}

if (Array.isArray(data)) {
if (Array.isArray(data) && prefix !== '') {
data.forEach((item) => {
this.createFormData(formData, item, `${prefix}[]`);
});
Expand Down
Loading

0 comments on commit c7ebcb8

Please sign in to comment.