diff --git a/lib/ace/document.js b/lib/ace/document.js index 70ab0509..4a886886 100644 --- a/lib/ace/document.js +++ b/lib/ace/document.js @@ -128,7 +128,7 @@ var Document = function(text) { * Get a verbatim copy of the given line as it is in the document */ this.getLine = function(row) { - return this.$lines[row] || ""; + return this.$lines ? (this.$lines[row] || "") : ""; }; this.getLines = function(firstRow, lastRow) {