Permalink
Browse files

check without nameOf

  • Loading branch information...
1 parent febedc0 commit 4ace329614ac320e9681a03fcb42162f2d7b3b33 @substack committed May 16, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 index.js
View
8 index.js
@@ -119,8 +119,12 @@ Fritter.prototype.defineContext = function () {
if (!before) return true;
if (!s) return true;
- var bn = self.nameOf(before);
- var sn = self.nameOf(s);
+ var bn = before.callee && (
+ before.callee.name
+ || (before.callee.id && before.callee.id.name)
+ );
+ var sn = s.id && s.id.name;
+
if (before.type === 'CallExpression'
&& bn && sn && bn === sn) {
return false;

0 comments on commit 4ace329

Please sign in to comment.