Skip to content

Commit c3abf8f

Browse files
committed
this is never true, is that intended? @sokra
1 parent 36cea59 commit c3abf8f

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lib/DefinePlugin.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,25 +61,19 @@ class DefinePlugin {
6161
function applyDefine(key, code) {
6262
const isTypeof = /^typeof\s+/.test(key);
6363
if(isTypeof) key = key.replace(/^typeof\s+/, "");
64-
let recurse = false;
65-
let recurseTypeof = false;
6664
code = toCode(code);
6765
if(!isTypeof) {
6866
parser.plugin("can-rename " + key, ParserHelpers.approve);
6967
parser.plugin("evaluate Identifier " + key, (expr) => {
70-
if(recurse) return;
7168
const res = parser.evaluate(code);
72-
recurse = false;
7369
res.setRange(expr.range);
7470
return res;
7571
});
7672
parser.plugin("expression " + key, ParserHelpers.toConstantDependency(code));
7773
}
7874
const typeofCode = isTypeof ? code : "typeof (" + code + ")";
7975
parser.plugin("evaluate typeof " + key, (expr) => {
80-
if(recurseTypeof) return;
8176
const res = parser.evaluate(typeofCode);
82-
recurseTypeof = false;
8377
res.setRange(expr.range);
8478
return res;
8579
});

0 commit comments

Comments
 (0)