Conversation
|
Are you sure it's good idea to remove checks? |
|
Actually, I think we should keep checks even if some inconsistent behaviour exists because checks' errors are useful for debugging. Meteor API document says that the type of Adding the above code yields the following result.
|
|
I've added check statements in this PR. |
files.coffee
Outdated
| find: (selector, options) -> | ||
| console.info "[FilesCollection] [find(#{JSON.stringify(selector)}, #{JSON.stringify(options)})]" if @debug | ||
| check selector, Match.OneOf Object, String, null | ||
| check selector, Match.Optional Match.OneOf Object, String, null |
There was a problem hiding this comment.
@exKAZUu have you run all test after this changes?
Looks like it will fail on Boolean values
There was a problem hiding this comment.
Meteor API document says that the type of selector is Mongo Selector, Object ID, or String.
So I think we should accept only Object, String, null and undefined.
Should we accept Boolean values?
There was a problem hiding this comment.
Neither theirs MongoCollection implementation is not fits the docs.
I think we should implement 1:1 behaviour
|
Thank you for your comment. |
|
@dr-dimitru If you want me to fix something, could you tell me it? Please note that we cannot satisfy with both |
|
@exKAZUu everything looks good to me, working on the new release now. |
|
I see. Thanks! |
#210
I've conducted the following tests and confirmed that there is no inconsistency.