I have the big problem with undefined param on collection remove filter.
// Method
removeData(params){
Collection.remove({otherField: params})
// It remove all doc, if param = undefined
// I think that don't have any remove
}
when you assign an object property with undefined variable, you will have an object without that property.
Then your command will be Collection.remove({})
Very thanks for your reply.
Now i checked in Meteor Guide
As a safety measure, if selector is omitted (or is undefined ), no documents will be removed. Set selector to {} if you really want to remove all documents from your collection.