Commit 1a0734fa authored by Jacob Schatz's avatar Jacob Schatz

Fix initial not syntax highlighting.

parent 3b431cc0
...@@ -18,11 +18,10 @@ const RepoEditor = { ...@@ -18,11 +18,10 @@ const RepoEditor = {
this.addMonacoEvents(); this.addMonacoEvents();
Helper.getContent().then(() => { Helper.getContent().then(() => {
const languages = this.monaco.languages.getLanguages();
const languageID = Helper.getLanguageIDForFile(this.activeFile, languages);
this.showHide(); this.showHide();
const newModel = this.monaco.editor.createModel(this.blobRaw, languageID);
if (this.blobRaw === '') return;
const newModel = this.monaco.editor.createModel(this.blobRaw, 'plaintext');
this.monacoInstance.setModel(newModel); this.monacoInstance.setModel(newModel);
}).catch(Helper.loadingError); }).catch(Helper.loadingError);
......
...@@ -194,10 +194,7 @@ const RepoHelper = { ...@@ -194,10 +194,7 @@ const RepoHelper = {
Store.prevURL = Service.blobURLtoParentTree(Service.url); Store.prevURL = Service.blobURLtoParentTree(Service.url);
} }
}) })
.catch(() => { .catch(RepoHelper.loadingError);
// RepoHelper.setLoading(false, loadingData);
RepoHelper.loadingError();
});
}, },
toFA(icon) { toFA(icon) {
...@@ -286,7 +283,8 @@ const RepoHelper = { ...@@ -286,7 +283,8 @@ const RepoHelper = {
} }
}, },
loadingError() { loadingError(e) {
console.log(e)
Flash('Unable to load the file at this time.'); Flash('Unable to load the file at this time.');
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment