Apparently it doesn't like null

This commit is contained in:
justcool393 2023-07-26 11:48:30 -05:00
parent b8e41184d8
commit 443759477b

View file

@ -94,7 +94,7 @@ function postToast(targetElement, url, method, data, callbackFn) {
if (data instanceof HTMLFormElement) {
formData = data;
}
var form = new FormData(formData);
var form = new FormData(formData ?? undefined);
form.append("formkey", formkey());
if (typeof data === 'object' && data !== null) {