Skip to content

Commit

Permalink
closes #1391
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasstjerne committed Apr 19, 2024
1 parent 9b2c15c commit d271764
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pages/Taxon/Verbatim.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const TYPES = {
"col:Name": "col:ID",
"col:Reference": "col:ID",
"gbif:Multimedia": "dwca:ID",
/* "tt:Tree": "tt:content",
*/
};

const Verbatim = ({
Expand Down Expand Up @@ -53,7 +55,10 @@ const Verbatim = ({
const type = res?.data?.type;
setType(type);
const primaryKey = TYPES[res?.data?.type] || null;
if (!primaryKey) {
if (type === "tt:Tree") {
setVerbatimRecords({ "tt:Tree": [res?.data] });
setLoading(false);
} else if (!primaryKey) {
setUnknownTypeErrMsg(`Unknown verbatim Taxon type: ${type}`);
setLoading(false);
} else if (_.get(termsMapReversed, `${type}.${primaryKey}`)) {
Expand Down

0 comments on commit d271764

Please sign in to comment.