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); const collection = Mongo.Collection.get(entryPointName);
if (!collection) { 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`) 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); const namedQuery = NamedQueryStore.get(entryPointName);
@ -38,6 +38,7 @@ export default (...args) => {
if (name) { if (name) {
const query = new NamedQuery(name, collection, body[entryPointName], ...rest); const query = new NamedQuery(name, collection, body[entryPointName], ...rest);
NamedQueryStore.add(name, query); NamedQueryStore.add(name, query);
return query; return query;
} else { } else {
return new Query(collection, body[entryPointName], ...rest); 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); const query = new NamedQuery(name, this, body, params);
NamedQueryStore.add(name, query); NamedQueryStore.add(name, query);
return query; return query;
} else { //Query } else { //Query
const body = args[0]; const body = args[0];
const params = args[1]; const params = args[1];