Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

fix regression introduced by bun timeout hotfix #676

Merged
merged 2 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/curly-geese-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/io": patch
---

Fix regression introduced by Bun `setTimeout` hotfix
2 changes: 1 addition & 1 deletion src/internal/timeout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

/** @internal */
const isBun = !!((process as any)?.isBun)
const isBun = typeof process === "undefined" ? false : !!((process as any)?.isBun)

/** @internal */
export const clear: (id: NodeJS.Timeout) => void = isBun ? clearInterval : clearTimeout
Expand Down