summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaladox none <thomasmulhall410@yahoo.com>2019-07-29 20:30:27 +0000
committerPaladox none <thomasmulhall410@yahoo.com>2019-07-31 13:28:35 +0000
commitcdf41352dae9107f20d4e8ec116ea5fb25c24a20 (patch)
tree5fd5b6e1789f3c2d6fac582846f72bebd9ac6f93
parent42b47b11c4b0dc79cb895cebeb241fcdf279b918 (diff)
Add undefined check to gr-list-view
-rw-r--r--polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view.js b/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view.js
index 53d05e1044..2508196650 100644
--- a/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view.js
+++ b/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view.js
@@ -90,11 +90,11 @@
},
_hideNextArrow(loading, items) {
- let lastPage = false;
- if (items.length < this.itemsPerPage + 1) {
- lastPage = true;
+ if (loading || !items || !items.length) {
+ return true;
}
- return loading || lastPage || !items || !items.length;
+ const lastPage = items.length < this.itemsPerPage + 1;
+ return lastPage;
},
});
})();