mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
fix: don't crash if content is undefined
This commit is contained in:
@@ -178,7 +178,10 @@ SocketPosts.editQueuedContent = async function (socket, data) {
|
||||
throw new Error('[[error:invalid-data]]');
|
||||
}
|
||||
await posts.editQueuedContent(socket.uid, data.id, data.content, data.title);
|
||||
return await plugins.fireHook('filter:parse.post', { postData: data });
|
||||
if (data.content) {
|
||||
return await plugins.fireHook('filter:parse.post', { postData: data });
|
||||
}
|
||||
return { postData: data };
|
||||
};
|
||||
|
||||
require('../promisify')(SocketPosts);
|
||||
|
||||
Reference in New Issue
Block a user