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

findOne when not ready => undefinded #79

Open
jycouet opened this issue Jan 26, 2017 · 1 comment
Open

findOne when not ready => undefinded #79

jycouet opened this issue Jan 26, 2017 · 1 comment

Comments

@jycouet
Copy link

jycouet commented Jan 26, 2017

Hi,

I'm facing an issue with findOne function.
Yes, when the subscription is not ready, the function return undefined.

Should we wait subscriptionReady for a findOne Operation?
Or I'm going in the wrong direction?

Let me know :)
Thank you

@jycouet
Copy link
Author

jycouet commented Jan 31, 2017

Everything is wrapped in a:

MeteorObservable.autorun().zone().subscribe(() => {
...
});

I was taking the result only if DDP._allSubscriptionsReady() is true... but I found that sometime DDP._allSubscriptionsReady() is true and the findOne returns undefined! (I'm sure it's not undefined)

Could you help me? :)

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

No branches or pull requests

1 participant