Skip to content

Commit 2cd8040

Browse files
authored
Fix choropleth example (#688)
Fixes #687 by switching away from wrongly implemented nullish coalescing operator. There are probably a couple different ways to do this, so this is just one that seems simple and effective.
1 parent ffe22ca commit 2cd8040

File tree

1 file changed

+1
-1
lines changed
  • packages/layerchart/src/routes/docs/examples/Choropleth

1 file changed

+1
-1
lines changed

packages/layerchart/src/routes/docs/examples/Choropleth/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
/>
115115
<Tooltip.Item
116116
label="Est. Percent under 18"
117-
value={d?.percentUnder18 ?? 0 / 100}
117+
value={d ? d.percentUnder18 / 100 : 0}
118118
format="percentRound"
119119
valueAlign="right"
120120
/>

0 commit comments

Comments
 (0)