From 52c8e4bc5a593568b3941c83b5b61e93e849dbcf Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 22 Jun 2012 18:04:19 +0100 Subject: [PATCH] Sanity check --- public/js/render/live.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/render/live.js b/public/js/render/live.js index 944ac8ce..41dbe0e5 100644 --- a/public/js/render/live.js +++ b/public/js/render/live.js @@ -49,7 +49,7 @@ function codeChangeLive(event, data) { // ignore } else if (panel.visible) { // test to see if they're write a while loop - if (jsbin.panels.focused.id === 'javascript') { + if (jsbin.panels.focused && jsbin.panels.focused.id === 'javascript') { // check the current line doesn't match a for or a while or a do - which could trip in to an infinite loop editor = jsbin.panels.focused.editor; line = editor.getLine(editor.getCursor().line);