fixed bug in users paging

This commit is contained in:
Sebastian Sdorra
2018-08-01 14:58:52 +02:00
parent 2953c805f9
commit 6dd7397d14

View File

@@ -50,9 +50,9 @@ class Users extends React.Component<Props> {
/**
* reflect page transitions in the uri
*/
componentDidUpdate = (prevProps: Props) => {
componentDidUpdate() {
const { page, list } = this.props;
if (list.page) {
if (list && list.page || list.page === 0) {
// backend starts paging by 0
const statePage: number = list.page + 1;
if (page !== statePage) {