Skip to content

Commit

Permalink
fix: reject an error
Browse files Browse the repository at this point in the history
  • Loading branch information
wcp1231 committed Oct 13, 2015
1 parent 8447979 commit ccf66f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ module.exports = function (schema, options) {
})).then(function(result) {

if(result.n === 0) {
return Promise.reject('state not changed');
return Promise.reject(new Error('state not changed'));
}

var callbacks = [];
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "another-mongoose-statemachine",
"version": "1.6.0",
"version": "1.6.1",
"description": "State machine plugin for Mongoose ODM",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit ccf66f8

Please sign in to comment.