Skip to content

Commit

Permalink
Revert "fix: add random number to db id seed" (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
kettanaito authored Oct 7, 2023
1 parent 77d2263 commit 90c7272
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/db/Database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export type DatabaseEventsMap = {
}

let callOrder = 0
const seed = Math.random() * 10_000_000;

export class Database<Dictionary extends ModelDictionary> {
public id: string
Expand Down Expand Up @@ -73,7 +72,7 @@ export class Database<Dictionary extends ModelDictionary> {
private generateId() {
const { stack } = new Error()
const callFrame = stack?.split('\n')[4]
const salt = `${callOrder}-${callFrame?.trim()}-${Math.round(seed)}`
const salt = `${callOrder}-${callFrame?.trim()}`
return md5(salt)
}

Expand Down

0 comments on commit 90c7272

Please sign in to comment.