Skip to content
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

Fix/start after issue #137

Merged
merged 3 commits into from
Oct 6, 2022
Merged

Fix/start after issue #137

merged 3 commits into from
Oct 6, 2022

Conversation

varsis
Copy link
Member

@varsis varsis commented Oct 6, 2022

No description provided.

Comment on lines +286 to +288
if (val instanceof InProcessFirestoreDocRef) {
return val.id
}
Copy link

@molloyjj molloyjj Oct 6, 2022

Choose a reason for hiding this comment

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

How was this being absent causing an infinite loop out of interest?

Copy link
Member Author

Choose a reason for hiding this comment

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

val was being cast to a string which was being returned as [Object object] in the following if block

if (val && typeof val.toString === "function") {
            val = val.toString()
        }

When we passed in a document ref instead of a string value this would occur. When the filtering was happening it was getting "DOCUMENT_ID" and "[Object object]" to compare.

The code I wrote uses the last document to start after, in this case it kept returning the same document over and over again and would never complete.

Copy link

@molloyjj molloyjj left a comment

Choose a reason for hiding this comment

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

Happy to approve based on the tests added, i'm not sure I understand the context of the issue this is fixing though.

@varsis varsis merged commit e1e37d0 into master Oct 6, 2022
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