Only check on fileName if it's there

This commit is contained in:
Matt Pass
2013-07-03 14:46:58 +01:00
parent 6dbef7c929
commit 8716026ae8

View File

@@ -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);