We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a37bc60 commit 4c463c6Copy full SHA for 4c463c6
examples/components/simpleviewer.js
@@ -88,10 +88,11 @@ const loadingTask = pdfjsLib.getDocument({
88
cMapPacked: CMAP_PACKED,
89
enableXfa: ENABLE_XFA,
90
});
91
-loadingTask.promise.then(function (pdfDocument) {
+(async function () {
92
+ const pdfDocument = await loadingTask.promise;
93
// Document loaded, specifying document for the viewer and
94
// the (optional) linkService.
95
pdfViewer.setDocument(pdfDocument);
96
97
pdfLinkService.setDocument(pdfDocument, null);
-});
98
+})();
0 commit comments