fix: node 14 is still supported and does not have hasOwn

Signed-off-by: Mark David Avery <mark@webark.cc>
This commit is contained in:
Mark David Avery
2022-05-05 07:11:32 -07:00
parent 7bc5db06c8
commit 74c218a54f
@@ -23,7 +23,7 @@ import { parseStringsParam } from './common';
function getPathArrayAndValue(input: Entity, field: string) {
return field.split('.').reduce(
([pathArray, inputSubset], pathPart, index, fieldParts) => {
if (Object.hasOwn(inputSubset, pathPart)) {
if (inputSubset.hasOwnProperty(pathPart)) {
return [pathArray.concat(pathPart), inputSubset[pathPart]];
} else if (fieldParts[index + 1] !== undefined) {
fieldParts[index + 1] = `${pathPart}.${fieldParts[index + 1]}`;