From 03d60ece3cc9c2b17bdd6a338760e948002c48d8 Mon Sep 17 00:00:00 2001 From: AriPerkkio Date: Mon, 4 Sep 2023 07:46:53 +0300 Subject: [PATCH] fix: store `clearTimeout` locally to prevent overriding it --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index b85c385..322cf3d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -138,7 +138,7 @@ function defaultSerialize(i: any) { const defaultDeserialize = defaultSerialize // Store public APIs locally in case they are overridden later -const { setTimeout } = globalThis +const { clearTimeout, setTimeout } = globalThis const random = Math.random.bind(Math) export function createBirpc, LocalFunctions = Record>(