mozilla/pdf.js — pull request #4546 by Snuffleupagus (2014-04-01 11:38:44+00:00)
Title: Prevent the Document Properties from being empty when the dialog is opened before the file has started loading

Currently when opening the Document Properties during file load, all fields will remain blank, with the following message printed in the console: `TypeError: PDFView.pdfDocument is null`.

This PR adds a promise that is resolved when the data is available, and also re-factors the code slightly to add a `updateUI` function so that the file size is set once it's available.