Skip to content

Commit b642739

Browse files
committed
fix(plugins/stargazers): bad scale when not enough values [skip ci]
1 parent fd2e774 commit b642739

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/plugins/stargazers/worldmap/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default async function(login, {locations, sample, imports, token}) {
4242
const svg = d3n.createSVG(480, 315)
4343
const countries = JSON.parse(await imports.fs.readFile(imports.paths.join(imports.__module(import.meta.url), "atlas/50m_countries.geojson")))
4444
const geopath = d3.geoPath(d3.geoMercator().fitWidth(svg.attr("width"), countries))
45-
const splits = [...new Set(stars.values())].sort((a, b) => a - b)
45+
const splits = [...new Set([0, ...stars.values()])].sort((a, b) => a - b)
4646
svg
4747
.append("g")
4848
.selectAll("path")

0 commit comments

Comments
 (0)