meteor / react-packages

Meteor packages for a great React developer experience
http://guide.meteor.com/react.html
Other
574 stars 159 forks source link

Fix useFind in SSR: check for server Cursor #350

Closed edemaine closed 2 years ago

edemaine commented 2 years ago

Fixes #334, as described in this comment.

Before this PR, server-side useFind printed a warning and returned []. After this PR, the warning is gone and the correct cursor.find() results are returned.

CaptainN commented 2 years ago

Thanks so much for taking the time to produce a PR! I'll review and get back to you soon.

CaptainN commented 2 years ago

I actually think this is kind of important to fix and ship. cc: @StorytellerCZ

CLAassistant commented 2 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

:white_check_mark: CaptainN
:white_check_mark: edemaine
:x: Kevin Newman


Kevin Newman seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CaptainN commented 2 years ago

This is good to go. I'm not sure why the CLA thing is failing though.

CaptainN commented 2 years ago

@edemaine Great point. To be completely honest, I just wasn't sure Meteor's build pipeline supports ?? but yeah, it should totally use that. Feel free to make the change, or I can do it later. Thanks!

denihs commented 2 years ago

Hey @CaptainN and @edemaine, as soon as this last matter is figured out, let me know, and I'll release these changes. :palms_up_together:

edemaine commented 2 years ago

To be completely honest, I just wasn't sure Meteor's build pipeline supports ?? but yeah, it should totally use that.

I believe ?? was introduced at the same time as ?., so should be safe.

Feel free to make the change, or I can do it later.

Done! This should be good to go now.

denihs commented 2 years ago

Version 2.5.1 is now up :tada: