From b8ee5e4fc44bf8a37d3a8e47bc32bfe56f058aba Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 30 Jan 2015 13:54:41 -0500 Subject: js: Fix display when there are 0 search results * js/controller/packages.js (guix.packages.packages): Default to empty array. * js/model/packages.js (guix.packages.Pager.currentPage): Always return an array * js/view/packages.js (guix.packages.view): Show spinner when there are 0 packages loaded from the server, not when there are 0 pages of results. --- js/view/packages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/view') diff --git a/js/view/packages.js b/js/view/packages.js index c2cde74..77b9785 100644 --- a/js/view/packages.js +++ b/js/view/packages.js @@ -224,7 +224,7 @@ return null; } - return guix.withLayout(ctrl.pager().isEmpty() ? spinner : [ + return guix.withLayout(_.isEmpty(ctrl.packages()) ? spinner : [ guix.ui.headerWithBadge("Packages", ctrl.packageCount()), renderModal(), renderSearchBox(), -- cgit v1.2.3