From afc7f9b669b9b6a631f4658f6aebc64ea01dd6ee Mon Sep 17 00:00:00 2001 From: Gaurav Vaidya Date: Wed, 19 Jun 2024 00:29:16 -0400 Subject: [PATCH] Minor fixes. --- src/wrappers/SpecimenWrapper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wrappers/SpecimenWrapper.js b/src/wrappers/SpecimenWrapper.js index 5103391..a919804 100644 --- a/src/wrappers/SpecimenWrapper.js +++ b/src/wrappers/SpecimenWrapper.js @@ -57,12 +57,12 @@ class SpecimenWrapper { static fromOccurrenceID(occurrenceID, basisOfRecord = 'PreservedSpecimen') { // Copy the occurrence ID so we can truncate it if necessary. let occurID = occurrenceID; - if (occurID.startsWith('urn:catalog:')) occurID = occurID.substr(12); + if (occurID.startsWith('urn:catalog:')) occurID = occurID.substring(12); // Prepare the specimen. const specimen = { '@type': SpecimenWrapper.TYPE_SPECIMEN, - basisOfRecord: basisOfRecord, + basisOfRecord, occurrenceID: occurID, };