fix corner case in rename (#3481)

fixes #3480
This commit is contained in:
Alex Lam S.L
2019-10-15 19:44:07 +08:00
committed by GitHub
parent 86a8016323
commit 8af2f5fbcf
4 changed files with 135 additions and 6 deletions

View File

@@ -1355,7 +1355,7 @@ function OutputStream(options) {
});
DEFPRINT(AST_Symbol, function(self, output) {
var def = self.definition();
output.print_name(def ? def.mangled_name || def.name : self.name);
output.print_name(def && def.mangled_name || self.name);
});
DEFPRINT(AST_Hole, noop);
DEFPRINT(AST_This, function(self, output) {