From 0e86a9c2c4eef2588f398b9627daa9272ea0e350 Mon Sep 17 00:00:00 2001 From: Gaurav Vaidya Date: Tue, 17 Dec 2024 01:16:31 -0500 Subject: [PATCH] Replaced deprecated method with non-deprecated method. --- src/wrappers/SpecimenWrapper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wrappers/SpecimenWrapper.js b/src/wrappers/SpecimenWrapper.js index 805ef26..acbdf1e 100644 --- a/src/wrappers/SpecimenWrapper.js +++ b/src/wrappers/SpecimenWrapper.js @@ -57,7 +57,7 @@ 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 = {