Skip to content

Commit

Permalink
ignore proto properties
Browse files Browse the repository at this point in the history
  • Loading branch information
epoberezkin committed Jun 30, 2020
1 parent 65b2f7d commit 1105fd5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/dot/properties.jst
Expand Up @@ -28,9 +28,9 @@
, $nextData = 'data' + $dataNxt
, $dataProperties = 'dataProperties' + $lvl;

var $schemaKeys = Object.keys($schema || {})
var $schemaKeys = Object.keys($schema || {}).filter(notProto)
, $pProperties = it.schema.patternProperties || {}
, $pPropertyKeys = Object.keys($pProperties)
, $pPropertyKeys = Object.keys($pProperties).filter(notProto)
, $aProperties = it.schema.additionalProperties
, $someProperties = $schemaKeys.length || $pPropertyKeys.length
, $noAdditional = $aProperties === false
Expand All @@ -42,8 +42,11 @@
, $currentBaseId = it.baseId;

var $required = it.schema.required;
if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired)
if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) {
var $requiredHash = it.util.toHash($required);
}

function notProto(p) { return p !== '__proto__'; }
}}


Expand Down

0 comments on commit 1105fd5

Please sign in to comment.