| Index: chrome/browser/resources/ntp4/page_switcher.js
|
| diff --git a/chrome/browser/resources/ntp4/page_switcher.js b/chrome/browser/resources/ntp4/page_switcher.js
|
| index cf17ed5b263c76bb6b2f94715b583ad2cf7f089b..939a240add61eeddfe65f45b253065a54b98110e 100644
|
| --- a/chrome/browser/resources/ntp4/page_switcher.js
|
| +++ b/chrome/browser/resources/ntp4/page_switcher.js
|
| @@ -32,7 +32,9 @@ cr.define('ntp4', function() {
|
| */
|
| activate_: function() {
|
| var cardSlider = ntp4.getCardSlider();
|
| - cardSlider.selectCard(cardSlider.currentCard + this.direction_, true);
|
| + var index = cardSlider.currentCard + this.direction_;
|
| + var numCards = cardSlider.cardCount - 1;
|
| + cardSlider.selectCard(Math.max(0, Math.min(index, numCards)), true);
|
| },
|
|
|
| /**
|
|
|