Skip to content

Commit

Permalink
refactor(appellate): Early exit for missing doc_id in combined PDF page
Browse files Browse the repository at this point in the history
  • Loading branch information
ERosendo committed Jan 27, 2025
1 parent a538050 commit dd02c83
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/appellate/appellate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,16 @@ AppellateDelegate.prototype.handleCombinedPdfPageView = async function () {
return;
}

this.docId = await checkSingleDocInCombinedPDFPage(
this.tabId,
this.court,
this.docId,
true
);
// If no pacer_doc_id is available, exit this block to prevent unnecessary
// page modifications intended for PDF retrieval.
if (!this.docId) return;

await this.overrideDefaultForm();

// When we receive the message from the above submit method, submit the form
Expand All @@ -1093,13 +1103,6 @@ AppellateDelegate.prototype.handleCombinedPdfPageView = async function () {
this.onDocumentViewSubmit.bind(this),
false
);

this.docId = await checkSingleDocInCombinedPDFPage(
this.tabId,
this.court,
this.docId,
true
);
};

// If this page offers a single document, intercept navigation to the document
Expand Down

0 comments on commit dd02c83

Please sign in to comment.