Skip to content

Commit

Permalink
fix: #7508
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Apr 1, 2019
1 parent 6d8880d commit b52dba5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/posts/queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ module.exports = function (Posts) {
},
function (data, next) {
if (!data) {
return callback();
return callback(null, null);
}
try {
data.data = JSON.parse(data.data);
Expand Down
7 changes: 7 additions & 0 deletions test/posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,13 @@ describe('Post\'s', function () {
},
], done);
});

it('should not crash if id does not exist', function (done) {
socketPosts.reject({ uid: globalModUid }, { id: '123123123' }, function (err) {
assert.ifError(err);
done();
});
});
});

describe('upload methods', function () {
Expand Down

0 comments on commit b52dba5

Please sign in to comment.