make id optional in t.getIds

This commit is contained in:
Sebastian McKenzie 2014-11-04 12:56:53 +11:00
parent 71d87f5b97
commit c967cded78

View File

@ -117,7 +117,7 @@ t.getIds = function (node) {
search = search.concat(id.declarations); search = search.concat(id.declarations);
} else if (t.isVariableDeclarator(id)) { } else if (t.isVariableDeclarator(id)) {
search.push(id.id); search.push(id.id);
} else { } else if (id) {
throw new Error("unknown node " + id.type); throw new Error("unknown node " + id.type);
} }
} }