Skip to content

Commit

Permalink
add bucket.hasOwnProperty check
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Feb 26, 2020
1 parent 122491a commit 104acf6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function addFieldToDSL(dsl: object, field: IFieldType) {
export function extractPropertiesFromBucket(bucket: any, ignoreKeys: string[] = []) {
const properties: Record<string | number, unknown> = {};
for (const key in bucket) {
if (ignoreKeys.includes(key)) {
if (ignoreKeys.includes(key) || !bucket.hasOwnProperty(key)) {
continue;
}

Expand Down

0 comments on commit 104acf6

Please sign in to comment.