mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #7508
This commit is contained in:
@@ -215,7 +215,7 @@ module.exports = function (Posts) {
|
|||||||
},
|
},
|
||||||
function (data, next) {
|
function (data, next) {
|
||||||
if (!data) {
|
if (!data) {
|
||||||
return callback();
|
return callback(null, null);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
data.data = JSON.parse(data.data);
|
data.data = JSON.parse(data.data);
|
||||||
|
|||||||
@@ -928,6 +928,13 @@ describe('Post\'s', function () {
|
|||||||
},
|
},
|
||||||
], done);
|
], 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 () {
|
describe('upload methods', function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user