Skip to content

Fix null in array #375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

Fix null in array #375

wants to merge 3 commits into from

Conversation

e3dio
Copy link
Contributor

@e3dio e3dio commented May 24, 2022

fix #371

@@ -243,7 +243,7 @@ export const arraySerializer = function arraySerializer(xs, serializer) {
if (Array.isArray(first) && !first.type)
return '{' + xs.map(x => arraySerializer(x, serializer)).join(',') + '}'

return '{' + xs.map(x =>
return '{' + xs.map(x => x == null ? 'null' :
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't this library only use strict equality comparisons?

Copy link
Owner

Choose a reason for hiding this comment

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

Yes, this isn't going in.. I've already got a fix for this in the works, so closing the PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You use whatever equality comparison is needed, this fix works great

@porsager
Copy link
Owner

Something is already on the way, but thanks anyway ;)

@porsager porsager closed this May 24, 2022
@e3dio
Copy link
Contributor Author

e3dio commented May 24, 2022

Ok could have said something like 5 days ago so I don't need to fix your library for you, thanks

@porsager
Copy link
Owner

I haven't asked you to, and I have other things to do than responding to ungrateful people I don't know on the internet. The way you've been conducting yourself previously doesn't really help either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inserting a Null (or Undefined with transform -> null) value in Array throws error
3 participants