From ae65dc54775527412a3360c16fc041221d7cc5f7 Mon Sep 17 00:00:00 2001 From: Mottie Date: Thu, 9 Oct 2014 17:05:56 -0500 Subject: [PATCH] Pager: fix empty table select showing 0 & 1 pages --- js/widgets/widget-pager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/widgets/widget-pager.js b/js/widgets/widget-pager.js index d692c21d..8729f688 100644 --- a/js/widgets/widget-pager.js +++ b/js/widgets/widget-pager.js @@ -446,7 +446,7 @@ tsp = ts.pager = { // as large page set links will slow the browser on large dom inserts var i, central_focus_size, focus_option_pages, insert_index, option_length, focus_length, wo = c.widgetOptions, - pg = Math.min( p.totalPages, p.filteredPages ), + pg = Math.min( p.totalPages, p.filteredPages ) || 1, // make skip set size multiples of 5 skip_set_size = Math.ceil( ( pg / wo.pager_maxOptionSize ) / 5 ) * 5, large_collection = pg > wo.pager_maxOptionSize,