Commit 1d7ba7a1 authored by HERBERT Ryan's avatar HERBERT Ryan Committed by Vidjil Team

builder.js annotation quality

Added checks so vidjil doesn't crash when loading an older .vidjil file
(one that doesn't contain the correct fields necessary for displaying
and/or updating info)
parent b22e31a8
......@@ -425,8 +425,9 @@ Builder.prototype = {
var parent = document.getElementById("info")
parent.innerHTML = "";
var patient_info = typeof this.m.info != 'undefined' ? this.m.info : "";
var div_patient_info = this.create_info_container(
this.m.info,
patient_info,
'patient_info',
'patient_info_text',
function() {
......@@ -597,6 +598,8 @@ Builder.prototype = {
function() {
//TODO id needs to be passed as param
var value = document.getElementById('edit_value').value;
if (typeof self.m.samples['info'] == 'undefined')
self.m.samples['info'] = new Array(self.m.samples.names.length, "");
self.m.samples['info'][self.m.t] = value
self.post_save(self)
});
......
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