Method with no parameters will error
@stubailo is already working on this.
Since Apr 25, 2016.
Assessment
This issue has not been assessed yet.
Description
So as per the Meteor guide, if you use mdg:validated-method to create a method that takes no parameters, you still must provide a validator, like so:
validate: new SimpleSchema({}).validator()
But there is an issue then if you then call that method with no parameters at all. e.g. calling
Collection.methods.methodName.call()
will error. As the validator, expects an object as the first parameter. Obviously just changing this to:
Collection.methods.methodName.call({})
fixes the issue, but it's a little awkward.
- Dominant language
- JavaScript
- Stars
- 193
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from meteor/validated-method
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
meteor/validated-method#95 · 1 comment ·
-
Async validation Open
Difficulty 4/5 3-5 days Newbie friendliness 38/100
meteor/validated-method#94 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
meteor/validated-method#89 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
meteor/validated-method#87 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
meteor/validated-method#81 · 1 comment ·
All issues in meteor/validated-method
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·