diff --git a/src/frontend/src/functions/auth.tsx b/src/frontend/src/functions/auth.tsx index 98514c234a85..5e4aa69b7190 100644 --- a/src/frontend/src/functions/auth.tsx +++ b/src/frontend/src/functions/auth.tsx @@ -37,7 +37,10 @@ function post(path: string, params: any, method = 'post') { form.action = path; for (const key in params) { - if (params.hasOwn(key)) { + if ( + params.hasOwn?.(key) || + Object.prototype.hasOwnProperty.call(params, key) + ) { const hiddenField = document.createElement('input'); hiddenField.type = 'hidden'; hiddenField.name = key;