Skip to content

Commit

Permalink
fix(element): null able mapIterable items
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Feb 15, 2023
1 parent 20ef97e commit 7bb7f01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/element/src/directives/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/
export function* mapIterable<T>(
_this: unknown,
items: Iterable<T> | undefined,
items: Iterable<T> | undefined | null,
f: (value: T) => unknown,
loading?: unknown,
): unknown {
if (items === undefined) {
if (items == null) {
return loading;
}
for (const value of items) {
Expand Down

0 comments on commit 7bb7f01

Please sign in to comment.