From e983a14f0fdde68830bae8a385dbcade814e5ee9 Mon Sep 17 00:00:00 2001 From: Richard Viney Date: Tue, 26 Jul 2022 06:46:21 +1200 Subject: [PATCH] fix: avoid using replaceAll() which isn't available in Node.js 14 (#296) --- src/DicomMessage.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/DicomMessage.js b/src/DicomMessage.js index 544444f5..ad8bf6a2 100644 --- a/src/DicomMessage.js +++ b/src/DicomMessage.js @@ -87,10 +87,7 @@ class DicomMessage { if (cleanTagString === "00080005") { if (readInfo.values.length > 0) { let coding = readInfo.values[0]; - coding = coding - .replaceAll("_", "-") - .replaceAll(" ", "-") - .toLowerCase(); + coding = coding.replace(/[_ ]/g, "-").toLowerCase(); if (coding in encodingMapping) { coding = encodingMapping[coding]; }