1
0
mirror of synced 2025-11-06 03:20:55 +08:00

auto commit

This commit is contained in:
yitter
2023-01-29 15:13:02 +08:00
parent 8eb29a43d2
commit 60f57cc26f
2 changed files with 2 additions and 2 deletions

View File

@@ -39,7 +39,7 @@ class Genid {
options.SeqBitLength = SeqBitLength;
}
// 5.MaxSeqNumber
const MaxSeqNumber = (1 << SeqBitLength) - 1;
const MaxSeqNumber = (1 << options.SeqBitLength) - 1;
if (options.MaxSeqNumber <= 0 || options.MaxSeqNumber === undefined) {
options.MaxSeqNumber = MaxSeqNumber;
}

View File

@@ -115,7 +115,7 @@ export class snowflakeIdv1 {
// 5.MaxSeqNumber
if (options.maxSeqNumber == undefined || options.maxSeqNumber <= 0)
options.maxSeqNumber = (1 << SeqBitLength) - 1
options.maxSeqNumber = (1 << options.SeqBitLength) - 1
// 6.MinSeqNumber
const MinSeqNumber = 5