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 4af9c41 commit a1d47c3Copy full SHA for a1d47c3
repl/repl.js
@@ -22,9 +22,11 @@ async function createREPL(elements) {
22
23
try {
24
const dateTimeFormat = new Intl.DateTimeFormat();
25
- timeZone = Module.allocateUTF8(dateTimeFormat.resolvedOptions().timeZone);
+ timeZone = Module.stringToNewUTF8(
26
+ dateTimeFormat.resolvedOptions().timeZone
27
+ );
28
} catch {
- timeZone = Module.allocateUTF8("UTC");
29
+ timeZone = Module.stringToNewUTF8("UTC");
30
}
31
32
if (Module._initialize_repl(timeZone) !== 0)
@@ -94,7 +96,7 @@ async function createREPL(elements) {
94
96
return node;
95
97
},
98
execute(text) {
- const encodedText = Module.allocateUTF8(text);
99
+ const encodedText = Module.stringToNewUTF8(text);
100
let oldRepl = globalDisplayToUser.repl;
101
102
globalDisplayToUser.repl = repl.private.outputs;
0 commit comments