add support for SpreadElement to types.getIds

This commit is contained in:
Sebastian McKenzie
2014-11-04 18:33:48 +11:00
parent 1df25a633c
commit fb0325a4d8

View File

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