We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec38493 commit fb1263dCopy full SHA for fb1263d
packages/bson/src/model.ts
@@ -32,7 +32,7 @@ for (let i = 0; i < 256; i++) {
32
* in types like t.any.
33
*/
34
export class ObjectId {
35
- static index: number = Math.ceil(Math.random() & 0xffffff);
+ static index: number = Math.ceil(Math.random() * 0xffffff);
36
37
static generate(time?: number): string {
38
if (!time) time = Math.ceil(Date.now() / 1000);
0 commit comments