Skip to content

Commit 3e44113

Browse files
authored
Merge pull request #1267 from WildMeOrg/fix_giraff_3_level_species_issue
fix giraff species issue
2 parents 2e07c33 + 58c484d commit 3e44113

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

frontend/src/pages/BulkImport/BulkImportStore.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,14 @@ export class BulkImportStore {
12461246
}
12471247

12481248
if (norm["Encounter.genus"] != null) {
1249-
const [g, s = ""] = norm["Encounter.genus"].split(" ");
1249+
const val = norm["Encounter.genus"].trim();
1250+
let g = val;
1251+
let s = "";
1252+
const i = val.indexOf(" ");
1253+
if (i !== -1) {
1254+
g = val.substring(0, i).trim();
1255+
s = val.substring(i + 1).trim();
1256+
}
12501257
raw["Encounter.genus"] = g;
12511258
raw["Encounter.specificEpithet"] = s;
12521259
}

0 commit comments

Comments
 (0)