We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6a78b7 commit 1b05598Copy full SHA for 1b05598
compiler/lib/js_output.ml
@@ -1407,8 +1407,14 @@ struct
1407
let last_semi ?(ret = false) () =
1408
if can_omit_semi
1409
then ()
1410
- else if ret && source_map_enabled
1411
- then PP.string f "; "
+ else if ret && source_map_enabled && PP.compact f
+ then
1412
+ (* In Chrome, the debugger will stop right after a return
1413
+ statement. We want a whitespace between this statement and
1414
+ the next one to avoid confusing this location and the
1415
+ location of the next statement. When pretty-printing, this
1416
+ is already the case. In compact mode, we add a newline. *)
1417
+ PP.string f ";\n"
1418
else PP.string f ";"
1419
in
1420
if stop_on_statement s then output_debug_info f loc;
0 commit comments