Skip to content

Commit

Permalink
iterating over an empty list behaves correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecAivazis committed Dec 17, 2022
1 parent 46be4fb commit 9e24857
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/houdini/src/runtime/public/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,7 @@ export class ListCollection<Def extends CacheTypeDef, ListName extends ValidList
}

*[Symbol.iterator]() {
if (!this.#collection) {
return
}

for (const entry of this.#collection) {
for (const entry of this.#collection ?? []) {
yield entry
}
}
Expand Down

0 comments on commit 9e24857

Please sign in to comment.