[Pkg-javascript-commits] [node-detective] 56/119: detect [,,,,]
Bastien Roucariès
rouca at moszumanska.debian.org
Wed Sep 6 09:44:35 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-detective.
commit e77d05b97d12f0bfd848dac8f02ba5463a15e2c0
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date: Tue May 21 23:44:59 2013 +0200
detect [,,,,]
---
index.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/index.js b/index.js
index 5188b7f..e8d3fc8 100644
--- a/index.js
+++ b/index.js
@@ -4,8 +4,10 @@ var escodegen = require('escodegen');
var traverse = function (node, cb) {
if (Array.isArray(node)) {
node.forEach(function (x) {
- x.parent = node;
- traverse(x, cb);
+ if(x != null) {
+ x.parent = node;
+ traverse(x, cb);
+ }
});
}
else if (node && typeof node === 'object') {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-detective.git
More information about the Pkg-javascript-commits
mailing list