Skip to content

Commit

Permalink
Move URL in js_printer.go to match enum def.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarron committed Aug 15, 2022
1 parent ceb5cc5 commit 7a9ff50
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions internal/js_printer/js_printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1886,13 +1886,6 @@ func (p *printer) printExpr(expr js_ast.Expr, level js_ast.L, flags printExprFla
p.print(")")
}

case *js_ast.ERelativeURL:
record := &p.importRecords[e.ImportRecordIndex]
if record.Kind == ast.ImportDynamic {
p.addSourceMapping(record.Range.Loc)
p.printQuotedUTF8(record.Path.Text, true /* allowBacktick */)
}

case *js_ast.EImportString:
var leadingInteriorComments []js_ast.Comment
if !p.options.MinifyWhitespace {
Expand All @@ -1901,6 +1894,13 @@ func (p *printer) printExpr(expr js_ast.Expr, level js_ast.L, flags printExprFla
p.addSourceMapping(expr.Loc)
p.printRequireOrImportExpr(e.ImportRecordIndex, leadingInteriorComments, level, flags)

case *js_ast.ERelativeURL:
record := &p.importRecords[e.ImportRecordIndex]
if record.Kind == ast.ImportDynamic {
p.addSourceMapping(record.Range.Loc)
p.printQuotedUTF8(record.Path.Text, true /* allowBacktick */)
}

case *js_ast.EImportCall:
var leadingInteriorComments []js_ast.Comment
if !p.options.MinifyWhitespace {
Expand Down

0 comments on commit 7a9ff50

Please sign in to comment.