get-focus/deprecated-focus-application

[Header] Error on header unmount

rodolpheV opened this issue · 1 comments

Since recently on Diane,
when there is a header on a first page,
and there is no header on a second page,
we get the error like 'wrong type... ' in HeaderComponent when accessing the second page from the first.
And I think it is because of the line 34 of the fix #55 : injectActionHeader(Empty). Indeed, as far as I understand, injectActionHeader is different from the others and need an object like {primary: , secondary: }, and not a component.
See in header-component:
{actions && <div data-focus='header-bar-actions'><ContentActionsComponent primary={actions.primary} secondary={actions.secondary} /></div>}
Empty.primary may cause an exception.