From a3c61e2b661c0dd473194ee412b5956e9d1076a8 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 17 Dec 2022 09:07:03 -0500 Subject: [PATCH] *Change casting --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } }