Skip to content

Commit 5b2c0b0

Browse files
authored
Merge pull request #402 from kwiksilver3441/main
substr deprecation fix
2 parents a866b9c + 35db3b3 commit 5b2c0b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/getID.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export default function (suffix = ''): string {
2-
return `__BVID__${Math.random().toString().substr(2, 6)}___BV_${suffix}__`
2+
return `__BVID__${Math.random().toString().slice(2, 8)}___BV_${suffix}__`
33
}

0 commit comments

Comments
 (0)