Skip to content

Commit 29bff02

Browse files
committed
modified: src/index.ts
1 parent 5659fbc commit 29bff02

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ export default (
8585
| undefined,
8686
index = the[keyIndex] as number,
8787
siblings = the[keySiblings] as Record<string, unknown>[];
88-
const id = Date.now().toString(36);
88+
const id = ((performance.now() * Math.random()) % 1)
89+
.toString(36)
90+
.slice(2);
8991
switch (true) {
9092
case !!the[keyParent]:
9193
siblings.splice(index + 1, 0, { [keyId]: id });

0 commit comments

Comments
 (0)