test: middleware/expose.js

This commit is contained in:
Barış Soner Uşaklı
2021-11-22 19:56:12 -05:00
parent fa1ac04dc6
commit 29b3587d91
3 changed files with 101 additions and 6 deletions

View File

@@ -109,7 +109,7 @@ Hooks.fire = async function (hook, params) {
Hooks.fire('action:plugins.firehook', payload);
}
if (result !== undefined) {
if (deleteCaller && result && result.caller) {
if (deleteCaller && result && result.hasOwnProperty('caller')) {
delete result.caller;
}
return result;