Skip to content

Commit

Permalink
fix number concat instead of add
Browse files Browse the repository at this point in the history
  • Loading branch information
ClanCo committed Nov 12, 2024
1 parent 7261db0 commit 8be5e0a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/src/utils/gridUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ export const transformDataContractIntoBlock = (grid: number[][]): Block[] => {
if (currentValue > 0) {
// La largeur est définie par la valeur
blocks.push({
id: Math.floor(Math.random() * 1000000) + Date.now(),
id: Number(
Math.floor(Math.random() * 1000000).toString() +
Date.now().toString(),
),
x,
y,
width: currentValue,
Expand Down

0 comments on commit 8be5e0a

Please sign in to comment.