Permalink
Browse files

Do not instrument Identifier when preceded by typeof

  • Loading branch information...
1 parent 66086cf commit 560d8c381d39d41d3fbe412e913ac736fc1ec1f3 @floriancargoet floriancargoet committed Dec 14, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 instrument.js
View
@@ -388,6 +388,11 @@ Instrumentor.prototype.wrap = function(tree, ignoredLines) {
parent.type == 'DoWhileStatement'))) {
return;
}
+ // Do not instrument Identifier when preceded by typeof
+ if (parent.operator == 'typeof') {
+ return;
+ }
+
}
var newNode = {
"type": "SequenceExpression",

0 comments on commit 560d8c3

Please sign in to comment.