Is that really possible? Would it be possible for the getter (https://github.com/mozilla/pdf.js/blob/master/web/viewer.js#L313) to be undefined when `PDFView.setHash` is called?
`PDFView.page` just returns `currentPageNumber` which should always be defined courtesy of this line: https://github.com/mozilla/pdf.js/blob/master/web/viewer.js#L78.