From f00ba1c0acaf0fb2a578efb05830cd0fc7adbec8 Mon Sep 17 00:00:00 2001 From: Carl-Philip Majgaard <12858069+majgaard@users.noreply.github.com> Date: Tue, 24 Mar 2026 12:24:26 -0400 Subject: [PATCH] Fix zip/combine for...in iterating inherited properties (#177) --- .changeset/twenty-paws-cry.md | 5 +++++ src/combine.ts | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 .changeset/twenty-paws-cry.md diff --git a/.changeset/twenty-paws-cry.md b/.changeset/twenty-paws-cry.md new file mode 100644 index 0000000..bf9af03 --- /dev/null +++ b/.changeset/twenty-paws-cry.md @@ -0,0 +1,5 @@ +--- +'wonka': patch +--- + +Replace for...in with for...of Object.keys() to avoid iterating inherited properties diff --git a/src/combine.ts b/src/combine.ts index d3e7329..b8834b2 100644 --- a/src/combine.ts +++ b/src/combine.ts @@ -61,7 +61,8 @@ function zip(sources: Source[] | Record>): Source)(signal => { if (signal === SignalKind.End) { if (endCount >= size - 1) { @@ -77,7 +78,7 @@ function zip(sources: Source[] | Record>): Source(sources: Source[] | Record>): Source