BigW Consortium Gitlab

Commit 1a0734fa by Jacob Schatz

Fix initial not syntax highlighting.

parent 3b431cc0
......@@ -18,11 +18,10 @@ const RepoEditor = {
this.addMonacoEvents();
Helper.getContent().then(() => {
const languages = this.monaco.languages.getLanguages();
const languageID = Helper.getLanguageIDForFile(this.activeFile, languages);
this.showHide();
if (this.blobRaw === '') return;
const newModel = this.monaco.editor.createModel(this.blobRaw, 'plaintext');
const newModel = this.monaco.editor.createModel(this.blobRaw, languageID);
this.monacoInstance.setModel(newModel);
}).catch(Helper.loadingError);
......
......@@ -194,10 +194,7 @@ const RepoHelper = {
Store.prevURL = Service.blobURLtoParentTree(Service.url);
}
})
.catch(() => {
// RepoHelper.setLoading(false, loadingData);
RepoHelper.loadingError();
});
.catch(RepoHelper.loadingError);
},
toFA(icon) {
......@@ -286,7 +283,8 @@ const RepoHelper = {
}
},
loadingError() {
loadingError(e) {
console.log(e)
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