Skip to content

Commit 6ecf9b5

Browse files
committed
fix incorrect random function to accept min/max parameters
1 parent 145e651 commit 6ecf9b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/views/dashboard/MainChart.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const MainChart = () => {
2626
})
2727
}, [chartRef])
2828

29-
const random = () => Math.round(Math.random() * 100)
29+
const random = (min = 0, max = 100) => Math.floor(Math.random() * (max - min + 1)) + min
3030

3131
return (
3232
<>

0 commit comments

Comments
 (0)