fix: dont add caller to arrays

This commit is contained in:
Barış Soner Uşaklı
2022-04-13 15:09:58 -04:00
parent 65cec8d026
commit 5316029f91

View File

@@ -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;