From 49d6c7d1bfd2825582caf578a2f1834569e93440 Mon Sep 17 00:00:00 2001 From: cpsdqs Date: Sun, 17 Sep 2017 11:03:27 +0200 Subject: [PATCH] Fix demo not working anymore --- js/demo.js | 3 +++ js/term_conn.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/js/demo.js b/js/demo.js index 85b7979..bb1d0a3 100644 --- a/js/demo.js +++ b/js/demo.js @@ -889,7 +889,10 @@ window.demoInterface = { } } }, + didInit: false, init (screen) { + if (this.didInit) return + this.didInit = true this.terminal = new ScrollingTerminal(screen) this.shell = new DemoShell(this.terminal, true) } diff --git a/js/term_conn.js b/js/term_conn.js index 35bda54..b5fb962 100644 --- a/js/term_conn.js +++ b/js/term_conn.js @@ -132,7 +132,7 @@ window.Conn = class TermConnection extends EventEmitter { if (typeof window.demoInterface === 'undefined') { alert('Demoing non-demo build!') // this will catch mistakes when deploying to the website } else { - demoInterface.init(screen) + demoInterface.init(this.screen) showPage() } return