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