Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jan 14, 2021
1 parent a105ca7 commit 2c55258
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ecmascript/codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2493,6 +2493,10 @@ fn escape_with_source<'s>(
s: &'s str,
single_quote: Option<bool>,
) -> String {
if target <= JscTarget::Es5 {
return escape_without_source(s, target, single_quote.unwrap_or(false));
}

if span.is_dummy() {
return escape_without_source(s, target, single_quote.unwrap_or(false));
}
Expand Down

0 comments on commit 2c55258

Please sign in to comment.