From 3d77943112ff32fd014ac30527fe1d6f9b151d91 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 26 Nov 2022 18:43:35 -0500 Subject: [PATCH] *Ensure id is a buffer --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 943360b..9304c2f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -42,7 +42,7 @@ export default class DHTCache extends EventEmitter { super(); if (!id) throw new TypeError("Must provide id for self"); - this.id = id; + this.id = b4a.from(id) as Buffer; this.bootstrapped = false; this.graph = new DiGraph(); this.connectedTo = new Set();