avoid exception

This commit is contained in:
Brian Gough 2014-12-01 15:24:19 +00:00
parent 0420e4638d
commit 440c1d3987

View file

@ -73,11 +73,11 @@ define [
@redraw = (position) ->
console.log 'in redraw'
console.log 'reseting pages array for', $scope.numPages
console.log 'position is', position.page, position.offset
$scope.pages = ({
pageNum: i + 1
} for i in [0 .. $scope.numPages-1])
if position? && position.page?
console.log 'position is', position.page, position.offset
console.log 'setting current page', position.page
pagenum = position.page
$scope.pages[pagenum].current = true