diff --git a/imports/api/genes/hectar/addHectar.js b/imports/api/genes/hectar/addHectar.js index eaa7bd4e..8f961a79 100644 --- a/imports/api/genes/hectar/addHectar.js +++ b/imports/api/genes/hectar/addHectar.js @@ -57,10 +57,10 @@ class HectarProcessor { // Filters undefined data (with a dash) and splits into an array for // comma-separated data. for (const [key, value] of Object.entries(annotations)) { - if (value[0] === '-') { + if (value === undefined || value[0] === '-') { annotations[key] = undefined; } - if (value.indexOf(',') > -1) { + if (value !== undefined && value.indexOf(',') > -1) { annotations[key] = value.split(','); } }