|
|
@@ -265,13 +265,13 @@ define [
|
|
|
lastVisiblePage = visiblePages[len-1].pageNum
|
|
|
lastVisiblePageIdx = lastVisiblePage - 1
|
|
|
# first page after
|
|
|
- if lastVisiblePageIdx + 1 < len
|
|
|
+ if lastVisiblePageIdx + 1 < scope.pages.length
|
|
|
extra.push scope.pages[lastVisiblePageIdx + 1]
|
|
|
# page before
|
|
|
if firstVisiblePageIdx > 0
|
|
|
extra.push scope.pages[firstVisiblePageIdx - 1]
|
|
|
# second page after
|
|
|
- if lastVisiblePageIdx + 2 < len
|
|
|
+ if lastVisiblePageIdx + 2 < scope.pages.length
|
|
|
extra.push scope.pages[lastVisiblePageIdx + 2]
|
|
|
return visiblePages.concat extra
|
|
|
|