Skip to content

Commit

Permalink
fix: store clearTimeout locally to prevent overriding it (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio authored Sep 4, 2023
1 parent b1d22ea commit 03d9313
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<RemoteFunctions = Record<string, never>, LocalFunctions = Record<string, never>>(
Expand Down

0 comments on commit 03d9313

Please sign in to comment.