stop traversing when target type is found

This commit is contained in:
nkzawa 2016-03-28 03:01:06 +09:00
parent 8fb6f878a3
commit 85ecb6c97b

View File

@ -104,7 +104,7 @@ traverse.removeProperties = function (tree) {
function hasBlacklistedType(path, state) {
if (path.node.type === state.type) {
state.has = true;
path.skip();
path.stop();
}
}