feat: show hook invocation in debug action

This commit is contained in:
cha0s 2018-12-24 13:21:18 -06:00
parent f86c2ce89c
commit 31901ea714

View File

@ -7,8 +7,14 @@ export function createDebugAction(debug, action) {
const debugAction = {type: action.type, payload: {...action.payload}};
if (!process.env.SILLY_DEBUG) {
for (const i in debugAction.payload) {
// Exceptions...
if (
// Invocation hook.
-1 !== ['truss/invoke', 'truss/invoke-flat'] && i !== 'hook'
) {
debugAction.payload[i] = '[...]';
}
}
}
return debugAction;
}