Fix history warning when opening entry.
When clicking on a entry in the listing, a console error would be logged by `history` (react-router): "Hash history cannot push state; it is ignored". This was caused because using `bind` in the click handler caused the return value to be passed to the `history.push` as the second param. This was ignored in react-router v2, but gives a warning in v4.
This commit is contained in:
parent
2abdd34502
commit
b9fdaec8b7
@ -48,7 +48,7 @@ export default class EntryListing extends React.Component {
|
||||
return (
|
||||
<Card
|
||||
key={entry.get('slug')}
|
||||
onClick={history.push.bind(this, path)} // eslint-disable-line
|
||||
onClick={() => history.push(path)} // eslint-disable-line
|
||||
className="nc-entryListing-card"
|
||||
>
|
||||
{ image &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user