Skip to content

Commit

Permalink
Merge pull request #6 from e-ucm/updateFix
Browse files Browse the repository at this point in the history
Fixes update request failure
  • Loading branch information
gorco committed Mar 6, 2017
2 parents d698fc9 + 49d8ca1 commit f94426d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions documentStorage/mongo-backend.js
Expand Up @@ -138,8 +138,7 @@ var MongoBackend = function (options) {
}, function (err, res) {
if (err) {
err = parseError(err);
}
if (res.result.n === 0) {
} else if (!res || !res.result || res.result.n === 0) {
err = new Error('No document found!');
err.status = 400;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -36,7 +36,7 @@
"coveralls": "*",
"grunt": "^0.4.5",
"handlebars": "*",
"jscs": "*",
"jscs": "2.9.0",
"istanbul": "*",
"jshint": "*",
"mocha": "*",
Expand Down

0 comments on commit f94426d

Please sign in to comment.