Skip to content

Commit

Permalink
Merge pull request #6088 from Rob--W/issue-6083
Browse files Browse the repository at this point in the history
Check availability of canvas & PDF before printing
  • Loading branch information
Snuffleupagus committed Jun 6, 2015
2 parents 749a60a + f4ba0e3 commit f943b29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/mozPrintCallback_polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

function renderProgress() {
var progressContainer = document.getElementById('mozPrintCallback-shim');
if (canvases) {
if (canvases && canvases.length) {
var progress = Math.round(100 * index / canvases.length);
var progressBar = progressContainer.querySelector('progress');
var progressPerc = progressContainer.querySelector('.relative-progress');
Expand Down
2 changes: 1 addition & 1 deletion web/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ var PDFViewerApplication = {

var alertNotReady = false;
var i, ii;
if (!this.pagesCount) {
if (!this.pdfDocument || !this.pagesCount) {
alertNotReady = true;
} else {
for (i = 0, ii = this.pagesCount; i < ii; ++i) {
Expand Down

0 comments on commit f943b29

Please sign in to comment.