Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Meteor.wrapAsync handling undefined properties wrong #11120
Comments
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
This issue has been automatically closed it has not had recent activity. |
|
Hi, I believe we should update the docs, do you agree @nytamin ?
Could you do that? |
|
Sure, I can look into it. It'll be a good exercise |
I have come across an issue where
Meteor.wrapAsyncis not handling undefined properties as it should.The documentation states that:
But in the case of
The arguments provided into
myWrapFunctionisaltough I expected this to happen:
This creates a significant problem, since the callback might not be the last parameter - which is in direct conflict with the docs.
This means that
myWrapFunction(1, undefined)andmyWrapFunction(1)might produce different results, even though they are in general thought of as identical.This has been addressed previously in #6816 , but I think it should be brought up again for review.
I see two possible solutions:
Tested in Meteor 1.10.2
Repo for reproducing the issue: https://github.com/nytamin/meteor-wrapAsync-bug