@hmcts/media-viewer 2.9.2 → 2.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -427,7 +427,7 @@
427
427
  this.documentLoadInit.next(documentUrl);
428
428
  _a.label = 1;
429
429
  case 1:
430
- _a.trys.push([1, 6, , 7]);
430
+ _a.trys.push([1, 7, , 8]);
431
431
  return [4 /*yield*/, loadingTask.promise];
432
432
  case 2:
433
433
  pdfDocument = _a.sent();
@@ -438,21 +438,24 @@
438
438
  return [4 /*yield*/, pdfDocument.getOutline()];
439
439
  case 3:
440
440
  outline = _a.sent();
441
+ if (!outline) return [3 /*break*/, 5];
441
442
  return [4 /*yield*/, this.setOutlinePageNumbers(pdfDocument, outline)];
442
443
  case 4:
443
444
  _a.sent();
445
+ _a.label = 5;
446
+ case 5:
444
447
  this.documentOutline = outline;
445
448
  this.outlineLoaded.next(this.documentOutline);
446
449
  return [4 /*yield*/, pdfDocument.getMetadata()];
447
- case 5:
450
+ case 6:
448
451
  pdfMetaData = _a.sent();
449
452
  this.setCurrentPDFTitle(pdfMetaData.info.Title);
450
- return [3 /*break*/, 7];
451
- case 6:
453
+ return [3 /*break*/, 8];
454
+ case 7:
452
455
  e_1 = _a.sent();
453
456
  this.documentLoadFailed.next(e_1);
454
- return [3 /*break*/, 7];
455
- case 7: return [2 /*return*/];
457
+ return [3 /*break*/, 8];
458
+ case 8: return [2 /*return*/];
456
459
  }
457
460
  });
458
461
  });