Skip to content

Commit e471678

Browse files
lekoalaGuySartorelli
authored andcommitted
keep compatibility with aftersubmitform
1 parent a3cf12a commit e471678

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

client/src/legacy/LeftAndMain.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,12 @@ $.entwine('ss', function($) {
575575
var newContentEls = self.handleAjaxResponse(data, status, xhr);
576576
if(!newContentEls) return;
577577

578-
newContentEls.filter('form').trigger('aftersubmitform', {status: status, xhr: xhr, formData: formData});
578+
var formObject = {};
579+
// Convert to a plain object for legacy compatibility
580+
for (var pair of formData.entries()) {
581+
formObject[pair[0]] = pair[1];
582+
}
583+
newContentEls.filter('form').trigger('aftersubmitform', {status: status, xhr: xhr, formData: formObject});
579584
}
580585
}, ajaxOptions));
581586
});

0 commit comments

Comments
 (0)