mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46: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;
|
return;
|
||||||
}
|
}
|
||||||
let deleteCaller = false;
|
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');
|
const als = require('../als');
|
||||||
params.caller = als.getStore();
|
params.caller = als.getStore();
|
||||||
deleteCaller = true;
|
deleteCaller = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user