From 551e57406d322eb290cfc93c032af6a939deee56 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sun, 27 Apr 2014 11:02:45 -0400 Subject: [PATCH] appDisplay: Remove redundant checks for pageNumber We already do these at the beginning of the function. https://bugzilla.gnome.org/show_bug.cgi?id=729064 --- js/ui/appDisplay.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index cf570cf73..2596929a4 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -472,14 +472,12 @@ const AllView = new Lang.Class({ // longer than PAGE_SWITCH_TIME time = Math.min(time, PAGE_SWITCH_TIME); - if (pageNumber < this._grid.nPages() && pageNumber >= 0) { - this._currentPage = pageNumber; - Tweener.addTween(this._adjustment, - { value: this._grid.getPageY(this._currentPage), - time: time, - transition: 'easeOutQuad' }); - this._pageIndicators.setCurrentPage(pageNumber); - } + this._currentPage = pageNumber; + Tweener.addTween(this._adjustment, + { value: this._grid.getPageY(this._currentPage), + time: time, + transition: 'easeOutQuad' }); + this._pageIndicators.setCurrentPage(pageNumber); }, _diffToPage: function (pageNumber) {