mirror of
https://github.com/jsbin/jsbin.git
synced 2026-02-01 16:46:05 +00:00
Sanity check
This commit is contained in:
parent
aee13cdd2e
commit
52c8e4bc5a
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user