Skip to content

Commit

Permalink
keep compatibility with aftersubmitform
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoala authored and GuySartorelli committed Dec 5, 2024
1 parent a3cf12a commit e471678
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/src/legacy/LeftAndMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,12 @@ $.entwine('ss', function($) {
var newContentEls = self.handleAjaxResponse(data, status, xhr);
if(!newContentEls) return;

newContentEls.filter('form').trigger('aftersubmitform', {status: status, xhr: xhr, formData: formData});
var formObject = {};
// Convert to a plain object for legacy compatibility
for (var pair of formData.entries()) {
formObject[pair[0]] = pair[1];
}
newContentEls.filter('form').trigger('aftersubmitform', {status: status, xhr: xhr, formData: formObject});
}
}, ajaxOptions));
});
Expand Down

0 comments on commit e471678

Please sign in to comment.