From 5a3180433056cc2f461c25f1d6d2b94b562aaac2 Mon Sep 17 00:00:00 2001 From: Akita Noek Date: Fri, 4 Mar 2016 13:37:07 -0500 Subject: [PATCH] Just use num_pages when we're at the end of a nav list --- awx/ui/client/src/helpers/PaginationHelpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/ui/client/src/helpers/PaginationHelpers.js b/awx/ui/client/src/helpers/PaginationHelpers.js index 2fd9d57bf2..2b131c2dc0 100644 --- a/awx/ui/client/src/helpers/PaginationHelpers.js +++ b/awx/ui/client/src/helpers/PaginationHelpers.js @@ -32,7 +32,7 @@ export default // Which page are we on? if (Empty(next) && previous) { // no next page, but there is a previous page - scope[iterator + '_page'] = /page=\d+/.test(previous) ? parseInt(previous.match(/page=(\d+)/)[1]) + 1 : 2; + scope[iterator + '_page'] = scope[iterator + '_num_pages']; } else if (next && Empty(previous)) { // next page available, but no previous page scope[iterator + '_page'] = 1;