coding standards...

This commit is contained in:
herteby 2017-06-28 13:42:50 +02:00
parent 2b65928a07
commit 998a3a7023
2 changed files with 3 additions and 2 deletions

View file

@ -23,7 +23,7 @@ export default (...args) => {
const collection = Mongo.Collection.get(entryPointName);
if (!collection) {
if(name){ //is a NamedQuery
if (name) { //is a NamedQuery
throw new Meteor.Error('invalid-name', `We could not find any collection with the name "${entryPointName}". Make sure it is imported prior to using this`)
}
const namedQuery = NamedQueryStore.get(entryPointName);
@ -38,6 +38,7 @@ export default (...args) => {
if (name) {
const query = new NamedQuery(name, collection, body[entryPointName], ...rest);
NamedQueryStore.add(name, query);
return query;
} else {
return new Query(collection, body[entryPointName], ...rest);

View file

@ -9,8 +9,8 @@ _.extend(Mongo.Collection.prototype, {
const query = new NamedQuery(name, this, body, params);
NamedQueryStore.add(name, query);
return query;
} else { //Query
const body = args[0];
const params = args[1];