From 9dae734080af7af5ea5234098b1788efb51407cb Mon Sep 17 00:00:00 2001 From: zhangqin3 Date: Mon, 6 Jul 2015 18:57:16 +0800 Subject: [PATCH] [fixed] Negative page number in Pagination when ellipsis=true and items=1 --- src/Pagination.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Pagination.js b/src/Pagination.js index df159e70bf..3fb5901347 100644 --- a/src/Pagination.js +++ b/src/Pagination.js @@ -51,6 +51,9 @@ const Pagination = React.createClass({ if(!hasHiddenPagesAfter){ endPage = items; startPage = items - maxButtons + 1; + if(startPage < 1){ + startPage = 1; + } } else { endPage = startPage + maxButtons - 1; }