diff --git a/lib/client/edit.js b/lib/client/edit.js index 461fe39d..f5f6c7c3 100644 --- a/lib/client/edit.js +++ b/lib/client/edit.js @@ -50,9 +50,8 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip, MenuI ]); } - this.show = function(value) { + this.show = function() { var mode, htmlMode, jsMode, isHTML, isJS, modesByName, - isStr = type.string(value), name = Info.name, isDir = Info.isDir; @@ -96,22 +95,18 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip, MenuI setUseOfWorker(mode); setEmmet(isHTML); - Util.exec.if(isStr, function() { + Info.getData(function(error, data) { var UndoManager = ace.require('ace/undomanager').UndoManager; + Value = data; + + if (isJS && Session.getUseWorker()) + setJsHintConfig(); + Ace.setValue(Value); CloudCmd.View.show(Element, ConfigView); Session.setUndoManager(new UndoManager()); - }, function(callback) { - Info.getData(function(error, data) { - Value = data; - - if (isJS && Session.getUseWorker()) - setJsHintConfig(); - - callback(); - }); }); } };