fix eslint and flow warnings

This commit is contained in:
Sebastian Sdorra
2018-10-17 14:11:28 +02:00
parent 3429f17670
commit 1888a58cb0
14 changed files with 45 additions and 35 deletions

View File

@@ -18,8 +18,10 @@ class Paginator extends React.Component<Props> {
createAction = (linkType: string) => () => {
const { collection, onPageChange } = this.props;
if (onPageChange) {
const link = collection._links[linkType].href;
onPageChange(link);
const link = collection._links[linkType];
if (link && link.href) {
onPageChange(link.href);
}
}
};