simplify getStaticContext in es7.functionBind transformer - thanks @RReverser!

This commit is contained in:
Sebastian McKenzie
2015-05-14 17:48:51 +01:00
parent 724bf52929
commit a9d4b485d9

View File

@@ -16,11 +16,8 @@ function getTempId(scope) {
}
function getStaticContext(bind, scope) {
if (bind.object) {
return scope.isStatic(bind.object) && bind.object;
} else {
return scope.isStatic(bind.callee.object) && bind.callee.object;
}
var object = bind.object || bind.callee.object;
return scope.isStatic(object) && object;
}
function inferBindContext(bind, scope) {