Skip to content
This repository was archived by the owner on Aug 5, 2023. It is now read-only.

Commit cc0f939

Browse files
committed
process the code in next tick
1 parent 3666bdc commit cc0f939

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

static/js/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ runButton.addEventListener('click', () => {
2424
isProgramRunning = true;
2525
const code = editor.getValue();
2626

27-
const main = new Main(code);
28-
main.compile();
2927
const processingTime = (new Date()).toLocaleString();
3028
consoleTab.setValue(`Processing, started at: ${processingTime}\n`);
3129

3230
setTimeout(() => {
31+
const main = new Main(code);
32+
main.compile();
3333
const output = main.getOutput();
3434
const outputTime = (new Date()).toLocaleString();
3535
consoleTab.setValue(

0 commit comments

Comments
 (0)