fix edge case in entriesOf
This commit is contained in:
parent
9447071d64
commit
3bd17306f2
1 changed files with 4 additions and 0 deletions
|
@ -115,6 +115,10 @@ const entriesOf = (subject: object): Iterable<readonly [string | number, any]> =
|
|||
return subject.entries();
|
||||
}
|
||||
|
||||
if (subject === null || subject === undefined) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return Object.entries(subject);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue