Skip to content

Conversation

mbergal
Copy link

@mbergal mbergal commented Nov 10, 2022

Fixes: #73

@CLAassistant
Copy link

CLAassistant commented Nov 10, 2022

CLA assistant check
All committers have signed the CLA.

@mbergal mbergal changed the base branch from main to dev-release November 10, 2022 18:47
eventCount[subscriptionHash] ??= 0;
eventCount[subscriptionHash]++;
if (eventCount[subscriptionHash] === 1) {
resolvePromise(data || null);

Choose a reason for hiding this comment

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

Suggested change
resolvePromise(data || null);
resolvePromise(data ?? null);

Otherwise, if data === false you get back null and you never get the actual value of the data. 🤦🏼‍♂️

I spent hours trying to figure out why my DB value of false kept coming back null.

@futurus
Copy link

futurus commented Jul 15, 2023

@mbergal Do you mind signing the CLA please? A lot of peeps are waiting on this fix it looks like 😅

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

Successfully merging this pull request may close these issues.

Querying firestore documents with subscribe never fetches
4 participants