diff --git a/src/controllers/composer.js b/src/controllers/composer.js index baec8b62f6..36dd1fac40 100644 --- a/src/controllers/composer.js +++ b/src/controllers/composer.js @@ -22,6 +22,10 @@ exports.get = async function (req, res, callback) { templateData: {}, }); + if (!data || !data.templateData) { + return callback(new Error('[[error:invalid-data]]')); + } + if (data.templateData.disabled) { res.render('', { title: '[[modules:composer.compose]]',