change snowflake
This commit is contained in:
parent
38ca7ea280
commit
0227320876
1 changed files with 1 additions and 4 deletions
|
@ -10,10 +10,7 @@ abstract class SnowFlake{
|
||||||
try{
|
try{
|
||||||
return Number((BigInt(str) >> 22n) + 1420070400000n);
|
return Number((BigInt(str) >> 22n) + 1420070400000n);
|
||||||
}catch{
|
}catch{
|
||||||
console.error(
|
throw new Error(`The ID is corrupted, it's ${str} when it should be some number.`);
|
||||||
`The ID is corrupted, it's ${str} when it should be some number.`
|
|
||||||
);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue