From 8716026ae81a33d2b3c51e73ebe69e795bc2c48e Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Wed, 3 Jul 2013 14:46:58 +0100 Subject: [PATCH] Only check on fileName if it's there --- editor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor.php b/editor.php index 2722593..3b4bb39 100644 --- a/editor.php +++ b/editor.php @@ -177,7 +177,7 @@ function createNewCMInstance(num) { autoCloseTags: true, highlightSelectionMatches: true, showTrailingSpace: true, - lintWith: fileName.indexOf(".js")>-1 ? CodeMirror.javascriptValidator : false, + lintWith: fileName && fileName.indexOf(".js")>-1 ? CodeMirror.javascriptValidator : false, keyMap: "ICEcoder", onKeyEvent: function(thisCM, e) { top.ICEcoder.redoChangedContent(e);