Skip to content
Snippets Groups Projects
Commit 4c2057fb authored by Astor Bizard's avatar Astor Bizard :dog2:
Browse files

Fixed console error message appearing while editing execution/required files (trying to diff)

parent 1229ea5e
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
...@@ -361,16 +361,18 @@ define(['jquery', ...@@ -361,16 +361,18 @@ define(['jquery',
data: { id : current_id_vpl, name: fileName, val : editor.getValue() } data: { id : current_id_vpl, name: fileName, val : editor.getValue() }
}) })
.done(function( result ) { .done(function( result ) {
var diffData = result.response.diff; if (result.success) {
var modified = 'ace-changed'; // CSS class. var diffData = result.response.diff;
diffData.forEach(function(diff){ var modified = 'ace-changed'; // CSS class.
if(diff.type != "=") { diffData.forEach(function(diff){
editor.session.removeGutterDecoration(diff.ln2-1, modified); if(diff.type != "=") {
editor.session.addGutterDecoration(diff.ln2-1, modified); editor.session.removeGutterDecoration(diff.ln2-1, modified);
} else { editor.session.addGutterDecoration(diff.ln2-1, modified);
editor.session.removeGutterDecoration(diff.ln2-1, modified); } else {
} editor.session.removeGutterDecoration(diff.ln2-1, modified);
}); }
});
}
}); });
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment