diff --git a/example/templates/partials/ws.timl b/example/templates/partials/ws.timl index cf27c44..8590fc6 100644 --- a/example/templates/partials/ws.timl +++ b/example/templates/partials/ws.timl @@ -2,7 +2,9 @@ { function connectWatchoutServer() { const watchout = new WebSocket('ws://127.0.0.1:6502/ws'); - watchout.addEventListener('message', () => location.reload()); + watchout.addEventListener('message', (e) => { + if(e.data == '1') location.reload() + }); watchout.addEventListener('close', () => { setTimeout(() => { console.log('Watchout WebSocket is closed. Try again...') diff --git a/src/tim.nim b/src/tim.nim index 7cb887a..503d084 100755 --- a/src/tim.nim +++ b/src/tim.nim @@ -454,8 +454,6 @@ elif not isMainModule: newCall(ident("SourceCode"), newLit(functions.join("\n"))) ) ) - echo result.repr - macro initModule*(x: varargs[untyped]): untyped = initModule(x)