*Ensure id is a buffer

This commit is contained in:
Derrick Hammer 2022-11-26 18:43:35 -05:00
parent 5eb86d6acd
commit 3d77943112
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ export default class DHTCache extends EventEmitter {
super(); super();
if (!id) throw new TypeError("Must provide id for self"); if (!id) throw new TypeError("Must provide id for self");
this.id = id; this.id = b4a.from(id) as Buffer;
this.bootstrapped = false; this.bootstrapped = false;
this.graph = new DiGraph(); this.graph = new DiGraph();
this.connectedTo = new Set(); this.connectedTo = new Set();