File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/app/bitstream-page/clarin-zip-download-page Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -71,8 +71,11 @@ export class ClarinZipDownloadPageComponent extends ClarinBitstreamDownloadPageC
7171 this . bitstreams$ . next ( [ ...current , ...bitstreamsRD . payload . page ] ) ;
7272 this . bitstreamRD$ = createSuccessfulRemoteDataObject$ ( this . bitstreams$ . getValue ( ) [ 0 ] ) ;
7373 this . dtoken = isUndefined ( this . route . snapshot . queryParams . dtoken ) ? null : this . route . snapshot . queryParams . dtoken ;
74- this . zipDownloadLink . next ( this . halService . getRootHref ( ) +
75- `/core/items/${ itemRD . payload . uuid } /allzip?handleId=${ itemRD ?. payload ?. handle } &dtoken=${ this . dtoken } ` ) ;
74+ const baseUrl = this . halService . getRootHref ( ) +
75+ `/core/items/${ itemRD . payload . uuid } /allzip?handleId=${ itemRD ?. payload ?. handle } ` ;
76+ // Do not add `dtoken` into the URL if it is null
77+ const dtokenParam = this . dtoken ? `&dtoken=${ this . dtoken } ` : '' ;
78+ this . zipDownloadLink . next ( baseUrl + dtokenParam ) ;
7679 super . ngOnInit ( ) ;
7780 }
7881 } ) ;
You can’t perform that action at this time.
0 commit comments