From 4f4b50e01eb95f470bf58ed67be7196b0fedf720 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 5 Jun 2018 20:30:00 +0200 Subject: [PATCH] Rename `PDFDocumentProxy.pdfInfo` to `PDFDocumentProxy._pdfInfo` to indicate that the property should be considered "private" Since `PDFDocumentProxy` already provide getters for all the data returned by `GetDoc` (in the Worker), there isn't any compelling reason for accessing the `pdfInfo` directly on `PDFDocumentProxy`. --- src/display/api.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/display/api.js b/src/display/api.js index a9415b071..cfda93dd8 100644 --- a/src/display/api.js +++ b/src/display/api.js @@ -585,7 +585,7 @@ var PDFDataRangeTransport = (function pdfDataRangeTransportClosure() { */ var PDFDocumentProxy = (function PDFDocumentProxyClosure() { function PDFDocumentProxy(pdfInfo, transport, loadingTask) { - this.pdfInfo = pdfInfo; + this._pdfInfo = pdfInfo; this.transport = transport; this.loadingTask = loadingTask; } @@ -594,14 +594,14 @@ var PDFDocumentProxy = (function PDFDocumentProxyClosure() { * @return {number} Total number of pages the PDF contains. */ get numPages() { - return this.pdfInfo.numPages; + return this._pdfInfo.numPages; }, /** * @return {string} A unique ID to identify a PDF. Not guaranteed to be * unique. */ get fingerprint() { - return this.pdfInfo.fingerprint; + return this._pdfInfo.fingerprint; }, /** * @param {number} pageNumber The page number to get. The first page is 1.