Optimize node type lookup
This commit is contained in:
@@ -13,7 +13,7 @@ var find = function (obj, node, parent) {
|
||||
for (var i = 0; i < types.length; i++) {
|
||||
var type = types[i];
|
||||
|
||||
if (t["is" + type](node)) {
|
||||
if (t.is(type, node)) {
|
||||
var fn = obj[type];
|
||||
result = fn(node, parent);
|
||||
if (result != null) break;
|
||||
|
||||
Reference in New Issue
Block a user