From 42e3559cb42de91df07b645ca2b2e545a7c5ce2e Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sun, 21 Sep 2014 08:05:34 +0200 Subject: [PATCH] Fixed pager showing "1" before loading collection --- public_html/js/Presenters/PagedCollectionPresenter.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public_html/js/Presenters/PagedCollectionPresenter.js b/public_html/js/Presenters/PagedCollectionPresenter.js index 884c3d3f..a63debd8 100644 --- a/public_html/js/Presenters/PagedCollectionPresenter.js +++ b/public_html/js/Presenters/PagedCollectionPresenter.js @@ -154,6 +154,9 @@ App.Presenters.PagedCollectionPresenter = function( } function refreshPageList() { + if (typeof(totalPages) === 'undefined') { + return; + } var pages = getVisiblePages(); $pageList.empty(); var lastPage = 0;