Closed j-or closed 1 year ago
Turns out Math.max(...state.dataPoints.map(d => d.meta.id)) is a bad idea, because while Math.max([]) is 0, Math.max(...[]) is -Infinity 😞
Math.max(...state.dataPoints.map(d => d.meta.id))
Math.max([])
Math.max(...[])
Turns out
Math.max(...state.dataPoints.map(d => d.meta.id))
is a bad idea, because whileMath.max([])
is 0,Math.max(...[])
is -Infinity 😞