avoid exception on page size change

This commit is contained in:
Brian Gough 2015-03-19 14:26:06 +00:00
parent 6320fcccec
commit 3bdf2158c1

View file

@ -386,7 +386,7 @@ define [
#console.log 'page size change event', pageNum, delta
origposition = angular.copy scope.position
#console.log 'orig position', JSON.stringify(origposition)
if pageNum - 1 < origposition.page && delta != 0
if origposition? && pageNum - 1 < origposition.page && delta != 0
currentScrollTop = element.scrollTop()
#console.log 'adjusting scroll from', currentScrollTop, 'by', delta
scope.adjustingScroll = true