Permalink
Browse files

Merge pull request #2 from oyvindkinsey/patch1

Fixes a bug that would otherwise occur if the node was null.
  • Loading branch information...
2 parents 14f0a05 + 60b1579 commit 74b64ebf209577a9ad841eb093ac600c928530da Ryan Patterson committed Apr 23, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/jsgrep.js
View
@@ -993,12 +993,12 @@ var astIsEqual = exports.astIsEqual = function(node, pattern, config) {
var forEachNode = exports.forEachNode = function(node, callback) {
const tokens = Narcissus.definitions.tokenIds;
- callback(node);
-
if (node == null) {
return;
}
+ callback(node);
+
switch(node.type) {
// Core values
case tokens.FALSE:

0 comments on commit 74b64eb

Please sign in to comment.