Skip to content

Conversation

@compscidr
Copy link

@compscidr compscidr commented Sep 11, 2023

Based on findings outlined here: #14 (comment)

I think this will handle the case where we values which are mostly ints, but we get a float, or we have mostly floats but get an int (this is possible because firebase will change floats which are even to ints, for instance if you try to save 400.0, firebase will save it as 400, and if all the other values in a collection are floats, we will have problems trying to append to the slice with the existing code.

I expect adding a null into the mix will cause a similar crash, so in this case, I just detected a nil and added a 0 or 0.0 depending on the slice type.

I'm not entirely sure there isn't also a problem in the fireql library that this uses as well - will try out to verify asap.

@pgollangi
Copy link
Owner

LGTM! Thanks a lot @compscidr for the contribution.

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.

2 participants