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
When you call a method that has some side-effects (manipulates some collections), the returned promise resolves when the result event for that method is emitted.
Looking at the meteor guide about the method lifecycle, the promise should resolve when the updated event for the method is emitted.
In the Meteor client, the result event "doesnt call the Method callback yet". It only saves the return value for later when calling the callback after the updated event.
@pscanf@davidebianchi I am happy to provide a PR to fix this behaviour if you agree.
Here is a screenshot of the DDP events exchanged when invoking a method, that shows clearly that there is a lot of stuff still happening after the result event is emitted:
The text was updated successfully, but these errors were encountered:
When you call a method that has some side-effects (manipulates some collections), the returned promise resolves when the
result
event for that method is emitted.Looking at the meteor guide about the method lifecycle, the promise should resolve when the
updated
event for the method is emitted.In the Meteor client, the
result
event "doesnt call the Method callback yet". It only saves the return value for later when calling the callback after theupdated
event.@pscanf @davidebianchi I am happy to provide a PR to fix this behaviour if you agree.
Here is a screenshot of the DDP events exchanged when invoking a method, that shows clearly that there is a lot of stuff still happening after the
result
event is emitted:The text was updated successfully, but these errors were encountered: