mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
avoid exception on page size change
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user