Skip to content

Commit

Permalink
fix(dicomMessage): to handle undefined return value (#420)
Browse files Browse the repository at this point in the history
* fix(dicomMessage): to handle undefined return value

* formatter

Needed to fix OHIF/Viewers#4588
  • Loading branch information
sedghi authored Jan 17, 2025
1 parent 566da91 commit d1f7b75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build": "rollup -c",
"build:examples": "npm run build && npx cpx 'build/**/*.{js,map}' examples/js",
"start": "rollup -c -w",
"dev": "rollup -c -w",
"format": "prettier --write 'src/**/*.js' 'test/**/*.js'",
"format:check": "prettier --check 'src/**/*.js' 'test/**/*.js'",
"lint": "eslint --fix 'src/**/*.js' 'test/**/*.js'"
Expand Down
8 changes: 2 additions & 6 deletions src/DicomMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,8 @@ class DicomMessage {
values.push(value);
}
} else {
const { rawValue, value } = vr.read(
stream,
length,
syntax,
options
);
const { rawValue, value } =
vr.read(stream, length, syntax, options) || {};
if (!vr.isBinary() && singleVRs.indexOf(vr.type) == -1) {
rawValues = rawValue;
values = value;
Expand Down

0 comments on commit d1f7b75

Please sign in to comment.