[Pkg-javascript-commits] [node-jsonstream] 185/214: fix issue with nested object

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 1 12:58:58 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-jsonstream.

commit 7c6c697d961e8f4144bb70a03db8adb9be9f7f27
Author: Pavlo Boiko <pavlo.boiko at avid.com>
Date:   Tue May 10 15:04:15 2016 +0300

    fix issue with nested object
---
 index.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index a2b8f9e..59b6740 100755
--- a/index.js
+++ b/index.js
@@ -74,7 +74,8 @@ exports.parse = function (path, map) {
           if (!c) return
           if (check(nextKey, c.key)) {
             i++;
-            this.stack[j].value = null
+            if (this.stack[j])
+              this.stack[j].value = null
             break
           }
           j++
@@ -94,7 +95,8 @@ exports.parse = function (path, map) {
       }
     delete this.value[this.key]
     for(var k in this.stack)
-      this.stack[k].value = null
+      if (this.stack[k])
+        this.stack[k].value = null
   }
   parser._onToken = parser.onToken;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-jsonstream.git



More information about the Pkg-javascript-commits mailing list