Skip to content

Commit

Permalink
style: Improve error message for missing mapReduceOptions on instance
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed May 29, 2017
1 parent 23a3d1a commit f5e543f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ export class Model<TDocument extends { _id?: any }, TInstance> {
if (options.out && options.out == "inline")
return reject(new Error("Expected a non-inline mapReduce output mode for this method signature"));
if (!instanceType.mapReduceOptions)
return reject(new Error("mapReduceOptions not provided"));
return reject(new Error("Expected mapReduceOptions to be specified on the instance type"));
let opts = <MongoDB.MapReduceOptions>options;
let out : {[op: string]: string} = {};
out[(<string>options.out)] = instanceType.collection;
Expand Down

0 comments on commit f5e543f

Please sign in to comment.