Skip to content

Commit baba885

Browse files
Handle area and length calc exceptions (Update) (#62)
* Update conditionals to use explicit check for null values
1 parent d253914 commit baba885

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/viewer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ function _updateFeatureMeasurements (map, feature, pyramid) {
354354
const unitCodedConceptValue = unitSuffix
355355
const unitCodedConceptMeaning = unitSuffixToMeaningMap[unitSuffix]
356356

357-
if (area) {
357+
if (area != null) {
358358
measurement = new dcmjs.sr.valueTypes.NumContentItem({
359359
name: new dcmjs.sr.coding.CodedConcept({
360360
meaning: 'Area',
@@ -372,7 +372,7 @@ function _updateFeatureMeasurements (map, feature, pyramid) {
372372
})
373373
}
374374

375-
if (length) {
375+
if (length != null) {
376376
measurement = new dcmjs.sr.valueTypes.NumContentItem({
377377
name: new dcmjs.sr.coding.CodedConcept({
378378
meaning: 'Length',

0 commit comments

Comments
 (0)