Fix issue where pdfDocument is null
Happens when no file is loaded
This commit is contained in:
		
							parent
							
								
									3fc746cf7c
								
							
						
					
					
						commit
						eaa587753b
					
				@ -101,7 +101,9 @@ var SecondaryToolbar = {
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  lastPageClick: function secondaryToolbarLastPageClick(evt) {
 | 
			
		||||
    PDFView.page = PDFView.pdfDocument.numPages;
 | 
			
		||||
    if (PDFView.pdfDocument) {
 | 
			
		||||
      PDFView.page = PDFView.pdfDocument.numPages;
 | 
			
		||||
    }
 | 
			
		||||
    this.close();
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2376,8 +2376,8 @@ window.addEventListener('keydown', function keydown(evt) {
 | 
			
		||||
        }
 | 
			
		||||
        break;
 | 
			
		||||
      case 35: // end
 | 
			
		||||
        if (PresentationMode.active ||
 | 
			
		||||
            PDFView.page < PDFView.pdfDocument.numPages) {
 | 
			
		||||
        if (PresentationMode.active || (PDFView.pdfDocument &&
 | 
			
		||||
            PDFView.page < PDFView.pdfDocument.numPages)) {
 | 
			
		||||
          PDFView.page = PDFView.pdfDocument.numPages;
 | 
			
		||||
          handled = true;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user