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