Skip to content

Commit

Permalink
Do not display null entries
Browse files Browse the repository at this point in the history
  • Loading branch information
beaufortfrancois authored Mar 15, 2024
1 parent ff52be5 commit dc7dd15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ function expandSetLike(obj) {
function mapLikeToKeyValueArray(obj) {
const entries = [];
for (const key in obj) {
entries.push([key, obj[key]]);
if (obj[key] !== null) {
entries.push([key, obj[key]]);
}
}
return entries;
}
Expand Down

3 comments on commit dc7dd15

@beaufortfrancois
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@greggman I accidentally committed this fix (it was supposed to be a PR). Please let me know if it looks good to you and I'll keep it.

@greggman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm.

What was an example of something being null?

@beaufortfrancois
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.