From 24962968b3d2278d24d27170c64f111b1cf2704b Mon Sep 17 00:00:00 2001 From: Kamassau Date: Tue, 26 Mar 2024 12:11:39 +0100 Subject: [PATCH] Fix hectar loader --- imports/api/genes/hectar/addHectar.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/imports/api/genes/hectar/addHectar.js b/imports/api/genes/hectar/addHectar.js index eaa7bd4e..f81a9889 100644 --- a/imports/api/genes/hectar/addHectar.js +++ b/imports/api/genes/hectar/addHectar.js @@ -23,6 +23,7 @@ class HectarProcessor { * hectar. */ getNumberHectar() { + console.log("TEST CONSOLE.LOG") return this.nHectar; } @@ -57,10 +58,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(','); } }