mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: dont add caller to arrays
This commit is contained in:
@@ -115,7 +115,7 @@ Hooks.fire = async function (hook, params) {
|
||||
return;
|
||||
}
|
||||
let deleteCaller = false;
|
||||
if (params && typeof params === 'object' && !params.hasOwnProperty('caller')) {
|
||||
if (params && typeof params === 'object' && !Array.isArray(params) && !params.hasOwnProperty('caller')) {
|
||||
const als = require('../als');
|
||||
params.caller = als.getStore();
|
||||
deleteCaller = true;
|
||||
|
||||
Reference in New Issue
Block a user