Skip to content

Commit

Permalink
rpc: id gen fix
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Nov 5, 2023
1 parent a41d4de commit 33b77b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ export class RpcPeer {
}

generateId() {
return Array(8).map(() => RpcPeer.RANDOM_DIGITS.charAt(Math.floor(Math.random() * RpcPeer.RANDOM_DIGITS.length))).join('');
return [...new Array(8)].map(() => RpcPeer.RANDOM_DIGITS.charAt(Math.floor(Math.random() * RpcPeer.RANDOM_DIGITS.length))).join('');
}

createPendingResult(method: string, cb: (id: string, reject: (e: Error) => void) => void): Promise<any> {
Expand Down

0 comments on commit 33b77b6

Please sign in to comment.