Skip to content

Commit bcff9c6

Browse files
committed
Fix nblock gen
1 parent 4139151 commit bcff9c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

site/src/modules/workspaces/WorkspaceTiming/Chart/BarBlocks.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ export const BarBlocks: FC<BarBlocksProps> = ({ count }) => {
3737

3838
return (
3939
<div ref={blocksRef} css={styles.blocks}>
40-
{Array.from(Array(nOfBlocks).keys()).map((i) => (
41-
<div key={i} css={styles.block} style={{ minWidth: blockSize }} />
40+
{Array.from({ length: nOfBlocks }, (_, i) => i + 1).map((n) => (
41+
<div key={n} css={styles.block} style={{ minWidth: blockSize }} />
4242
))}
4343
{!hasSpacing && (
4444
<div css={styles.extraBlock}>

0 commit comments

Comments
 (0)