fix: #8840, don't crash if /compose route is called with no query params

This commit is contained in:
Barış Soner Uşaklı
2020-11-05 21:01:19 -05:00
parent 9e3eb5d41a
commit c61dee4b62

View File

@@ -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]]'));
}