diff --git a/lib/ace/edit_session.js b/lib/ace/edit_session.js index eaf6dca3..5791de72 100644 --- a/lib/ace/edit_session.js +++ b/lib/ace/edit_session.js @@ -86,7 +86,7 @@ var EditSession = function(text, mode) { return str; } - if (typeof text == "object") { + if (typeof text == "object" && text.getLine) { this.setDocument(text); } else { this.setDocument(new Document(text));