mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-30 18:46:01 +01:00 
			
		
		
		
	fix: crash on firing action hook that had no listeners registered
This commit is contained in:
		| @@ -36,6 +36,10 @@ define('hooks', [], () => { | ||||
| 	}; | ||||
|  | ||||
| 	const _fireActionHook = (hookName, data) => { | ||||
| 		if (!Hooks.hasListeners(hookName)) { | ||||
| 			return; | ||||
| 		} | ||||
|  | ||||
| 		Hooks.loaded[hookName].forEach(listener => listener(data)); | ||||
|  | ||||
| 		// Backwards compatibility (remove this when we eventually remove jQuery from NodeBB core) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user