fix corner case in ie8 (#4016)

fixes #4015
This commit is contained in:
Alex Lam S.L
2020-07-20 19:32:20 +01:00
committed by GitHub
parent a5db8cd14c
commit 61b66e83f1
2 changed files with 44 additions and 2 deletions

View File

@@ -230,6 +230,7 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options) {
} else {
new_def = scope.def_variable(node);
}
old_def.defun = new_def.scope;
old_def.orig.concat(old_def.references).forEach(function(node) {
node.thedef = new_def;
node.reference(options);