mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #8840, don't crash if /compose route is called with no query params
This commit is contained in:
@@ -22,6 +22,9 @@ exports.get = async function (req, res, callback) {
|
||||
templateData: {},
|
||||
});
|
||||
|
||||
if (res.headersSent) {
|
||||
return;
|
||||
}
|
||||
if (!data || !data.templateData) {
|
||||
return callback(new Error('[[error:invalid-data]]'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user