Closed
Description
The following code will cause a runtime error:
<LinkContainer to={{ search: updateSortSearchParams('hi') }}>
<Dropdown.Item>
hi
</Dropdown.Item>
</LinkContainer>
Whereas this will not
<LinkContainer to={{ path: '', search: updateSortSearchParams('hi') }}>
<Dropdown.Item>
hi
</Dropdown.Item>
</LinkContainer>
This is not the same behaviour as <Link />
which happily accepts a search-only 'to' object
Seems like this code in LinkContainer.js should handle undefined pathname
var path = _typeof(to) === 'object' ? to.pathname : to;
Metadata
Metadata
Assignees
Labels
No labels