From 40563347e9acc71d44c95c5cf2b99d8b080bd5ec Mon Sep 17 00:00:00 2001 From: nightwing Date: Mon, 19 Nov 2012 19:26:56 +0400 Subject: [PATCH] make getNewLineCharacter errorproof --- lib/ace/document.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ace/document.js b/lib/ace/document.js index 4d4d757d..a5439bf8 100644 --- a/lib/ace/document.js +++ b/lib/ace/document.js @@ -140,16 +140,16 @@ var Document = function(text) { * **/ this.getNewLineCharacter = function() { - switch (this.$newLineMode) { + switch (this.$newLineMode) { case "windows": - return "\r\n"; + return "\r\n"; case "unix": - return "\n"; + return "\n"; - case "auto": - return this.$autoNewLine; - } + default: + return this.$autoNewLine; + } }; this.$autoNewLine = "\n";