mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	fix: #8112, don't crash hook returns no data
This commit is contained in:
		| @@ -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]]', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user