diff --git a/src/index.ts b/src/index.ts index 4da6cd0..481a357 100644 --- a/src/index.ts +++ b/src/index.ts @@ -384,8 +384,8 @@ export default class DHTCache extends EventEmitter { origin.toString("hex"), destination.toString("hex") ); - } catch (e: any) { - if (e.name !== "JSNetworkXError") throw e; + } catch (e) { + if ((e as Error).name !== "JSNetworkXError") throw e; } }