Skip to content

Commit

Permalink
fix: avoid using replaceAll() which isn't available in Node.js 14 (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-viney authored Jul 25, 2022
1 parent 3ac3a64 commit e983a14
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/DicomMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down

0 comments on commit e983a14

Please sign in to comment.