auto commit
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user