File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -526,9 +526,15 @@ AppellateDelegate.prototype.handleAcmsDownloadPage = async function () {
526
526
. toLowerCase ( )
527
527
. includes ( 'accept charges and retrieve' ) ;
528
528
529
- let hasOneDocument = JSON . parse (
530
- sessionStorage . selectedDocuments
531
- ) . length == 1 ;
529
+ // The `selectedDocuments` key in sessionStorage is only available when
530
+ // the download page is loaded from an attachment page. It is not
531
+ // available when loaded from a case summary entry. This check ensures
532
+ // the extension can handle both scenarios gracefully.
533
+ let hasOneDocument = true ;
534
+ if ( sessionStorage . getItem ( 'selectedDocuments' ) ) {
535
+ hasOneDocument =
536
+ JSON . parse ( sessionStorage . selectedDocuments ) . length == 1 ;
537
+ }
532
538
533
539
if (
534
540
n . localName === 'div' &&
You can’t perform that action at this time.
0 commit comments