Skip to content

Commit 5d777af

Browse files
ankddevlpil
authored andcommitted
fix: message in 'echo .. as ..' is omitted in browser
Signed-off-by: Andrey <[email protected]>
1 parent 5288b74 commit 5d777af

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,3 +269,6 @@
269269
- Fixed a bug where renaming a constant which is referenced in another module
270270
inside a guard would generate invalid code.
271271
([Surya Rose](https://github.com/GearsDatapacks))
272+
273+
- Fixed a bug where `echo .. as ..` message will be omitted in browser target.
274+
([Andrey Kozhev](https://github.com/ankddev))

compiler-core/templates/echo.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function echo(value, message, file, line) {
1717
} else {
1818
// Otherwise, use `console.log`
1919
// The browser's console.log doesn't support ansi escape codes
20-
const string = `${file_line}\n${string_value}`;
20+
const string = `${file_line}${string_message}\n${string_value}`;
2121
globalThis.console.log(string);
2222
}
2323

0 commit comments

Comments
 (0)