fix reset for user created files (where therefore no original file is available)

This commit is contained in:
Ralf Teusner
2018-10-19 15:27:14 +02:00
parent 131f610116
commit 574e870bd1

View File

@ -113,7 +113,9 @@ CodeOceanEditorSubmissions = {
var file = _.find(response.files, function(file) { var file = _.find(response.files, function(file) {
return file.id === file_id; return file.id === file_id;
}); });
if(file){
editor.setValue(file.content); editor.setValue(file.content);
}
}.bind(this)); }.bind(this));
}.bind(this)); }.bind(this));
}, },