Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2 from oyvindkinsey/patch1

Fixes a bug that would otherwise occur if the node was null.
  • Loading branch information...
commit 74b64ebf209577a9ad841eb093ac600c928530da 2 parents 14f0a05 + 60b1579
Ryan Patterson authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/jsgrep.js
View
4 lib/jsgrep.js
@@ -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:
Please sign in to comment.
Something went wrong with that request. Please try again.