fix: #8112, don't crash hook returns no data

v1.18.x
Baris Usakli 5 years ago
parent 879acc85ae
commit 4eb9652a2a

@ -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]]',

Loading…
Cancel
Save