mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-23 13:31:21 +00:00
avoid exception on page size change
This commit is contained in:
parent
6320fcccec
commit
3bdf2158c1
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue