mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-06 23:38:48 +00:00
Fix for hasOwn (#8600)
- Also add null check on function call - Closes https://github.com/inventree/InvenTree/issues/8595
This commit is contained in:
parent
3149ae79ce
commit
7a3ceb9d6e
@ -37,7 +37,10 @@ function post(path: string, params: any, method = 'post') {
|
|||||||
form.action = path;
|
form.action = path;
|
||||||
|
|
||||||
for (const key in params) {
|
for (const key in params) {
|
||||||
if (params.hasOwn(key)) {
|
if (
|
||||||
|
params.hasOwn?.(key) ||
|
||||||
|
Object.prototype.hasOwnProperty.call(params, key)
|
||||||
|
) {
|
||||||
const hiddenField = document.createElement('input');
|
const hiddenField = document.createElement('input');
|
||||||
hiddenField.type = 'hidden';
|
hiddenField.type = 'hidden';
|
||||||
hiddenField.name = key;
|
hiddenField.name = key;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user