You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you make a simple async helper in conjuction with a meteor collection, during the sync of the collection, the helper is not updated.
I expect the helper to be refreshed once the collection is synced.
Blaze: 3.0.1
Meteor: 3.0.2
Here is a small code that you explain better the issue.
If you move up the line of find.fetch before the async call it's working as expected.
Template.Home.onCreated(()=>{Tracker.autorun(async()=>{constuser=awaitMeteor.userAsync();Meteor.subscribe('projects',[user?.someProp]);// Help sync Project Meteor Collection})})Template.Home.helpers({// This is not working as expectedasyncsomeHelper(): Promise<string>{const someAsyncCall =awaitmyFunction();if(someAsyncCall){const projects =Project.find({}).fetch();console.log(projects.length)// Always 0return'yeah';}return''}// This is working as expectedasyncsomeHelperWorking(): Promise<string>{const someAsyncCall =awaitmyFunction();constprojects=Project.find({}).fetch();if(someAsyncCall){console.log(projects.length)// Always 10 (The amount subscribed)return'yeah';}return''}})
Tell me if you need more information.
The text was updated successfully, but these errors were encountered:
If you make a simple async helper in conjuction with a meteor collection, during the sync of the collection, the helper is not updated.
I expect the helper to be refreshed once the collection is synced.
3.0.1
3.0.2
Here is a small code that you explain better the issue.
If you move up the line of
find.fetch
before the async call it's working as expected.Tell me if you need more information.
The text was updated successfully, but these errors were encountered: