From 363723fc84f7b8477592e0105aeb331ec9a017af Mon Sep 17 00:00:00 2001
From: Florian Dold <florian.dold@gmail.com>
Date: Mon, 14 Aug 2017 05:01:11 +0200
Subject: node_modules

---
 node_modules/ajv/lib/dot/missing.def | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

(limited to 'node_modules/ajv/lib/dot/missing.def')

diff --git a/node_modules/ajv/lib/dot/missing.def b/node_modules/ajv/lib/dot/missing.def
index 23ad04cf4..a73b9f966 100644
--- a/node_modules/ajv/lib/dot/missing.def
+++ b/node_modules/ajv/lib/dot/missing.def
@@ -1,8 +1,11 @@
 {{## def.checkMissingProperty:_properties:
-  {{~ _properties:_$property:$i }}
+  {{~ _properties:$propertyKey:$i }}
     {{?$i}} || {{?}}
-    {{ var $prop = it.util.getProperty(_$property); }}
-    ( {{=$data}}{{=$prop}} === undefined && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop) }}) )
+    {{
+      var $prop = it.util.getProperty($propertyKey)
+        , $useData = $data + $prop;
+    }}
+    ( ({{# def.noPropertyInData }}) && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) }}) )
   {{~}}
 #}}
 
@@ -20,15 +23,17 @@
   {{# def.error:_error }}
 #}}
 
+
 {{## def.allErrorsMissingProperty:_error:
   {{
-    var $prop = it.util.getProperty($reqProperty)
-      , $missingProperty = it.util.escapeQuotes($reqProperty);
+    var $prop = it.util.getProperty($propertyKey)
+      , $missingProperty = it.util.escapeQuotes($propertyKey)
+      , $useData = $data + $prop;
     if (it.opts._errorDataPathProperty) {
-      it.errorPath = it.util.getPath($currentErrorPath, $reqProperty, it.opts.jsonPointers);
+      it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
     }
   }}
-  if ({{=$data}}{{=$prop}} === undefined) {
+  if ({{# def.noPropertyInData }}) {
     {{# def.addError:_error }}
   }
 #}}
-- 
cgit v1.2.3

