Skip to content

Commit c08207c

Browse files
Merge pull request #889 from neo4j-labs/fix/rel-width-property-not-used
Fix: Default rel width applied on missing property value
2 parents ce7a21d + d165cce commit c08207c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/chart/graph/util/RecordUtils.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ function extractGraphEntitiesFromField(
6969
source: value.start.low,
7070
target: value.end.low,
7171
type: value.type,
72-
width: !Number.isNaN(value.properties[relWidthProperty])
73-
? toNumber(value.properties[relWidthProperty])
74-
: defaultRelWidth,
72+
width:
73+
value.properties[relWidthProperty] !== undefined && !Number.isNaN(value.properties[relWidthProperty])
74+
? toNumber(value.properties[relWidthProperty])
75+
: defaultRelWidth,
7576
color: value.properties[relColorProperty] ? value.properties[relColorProperty] : defaultRelColor,
7677
properties: value.properties,
7778
});

0 commit comments

Comments
 (0)