Skip to content

Commit 9ce9bfc

Browse files
committed
Minor adjustments
1 parent 14cb28b commit 9ce9bfc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ export const getScalePosition = async ({
3131
const nextScalePosition = entries[Math.max(position, 0)]?.position;
3232

3333
// Insert to beginning of list if there is no preceding entry
34-
// Note: use Math.random() rather than mean to reduce risk of collisions in concurrent edits
34+
// Note: use Math.random() rather to reduce risk of collisions in concurrent edits
3535
if (previousScalePosition === undefined)
3636
return nextScalePosition === undefined
3737
? Math.random()
3838
: nextScalePosition - Math.random();
3939

4040
// Insert to end of list if there is no following entry, or somewhere between adjacent entries
4141
return nextScalePosition === undefined
42-
? previousScalePosition + 1 * Math.random()
42+
? previousScalePosition + Math.random()
4343
: previousScalePosition + (nextScalePosition - previousScalePosition) * Math.random();
4444
};

0 commit comments

Comments
 (0)