Skip to content

Commit 610e85a

Browse files
jr-rkclaude
andcommitted
refactor: drop redundant optional chaining on checkSum
file is guaranteed by *ngFor and checkSum is truthy inside the *ngIf guard, so use plain file.checkSum / file.checkSum.value to match the surrounding template style. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 6dbb014 commit 610e85a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/app/item-page/full/field-components/file-section/full-file-section.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ <h3 class="h5 simple-view-element-header">{{"item.page.filesection.original.bund
2323
<dd class="col-md-8">{{(file.sizeBytes) | dsFileSize }}</dd>
2424

2525

26-
<ng-container *ngIf="file?.checkSum">
26+
<ng-container *ngIf="file.checkSum">
2727
<dt class="col-md-4">{{"item.page.filesection.checksum" | translate}}</dt>
28-
<dd class="col-md-8">{{ file?.checkSum?.value }}</dd>
28+
<dd class="col-md-8">{{ file.checkSum.value }}</dd>
2929
</ng-container>
3030

3131
<ng-container *ngIf="file.hasMetadata('dc.description')">
@@ -66,9 +66,9 @@ <h3 class="h5 simple-view-element-header">{{"item.page.filesection.license.bundl
6666
<dt class="col-md-4">{{"item.page.filesection.size" | translate}}</dt>
6767
<dd class="col-md-8">{{(file.sizeBytes) | dsFileSize }}</dd>
6868

69-
<ng-container *ngIf="file?.checkSum">
69+
<ng-container *ngIf="file.checkSum">
7070
<dt class="col-md-4">{{"item.page.filesection.checksum" | translate}}</dt>
71-
<dd class="col-md-8">{{ file?.checkSum?.value }}</dd>
71+
<dd class="col-md-8">{{ file.checkSum.value }}</dd>
7272
</ng-container>
7373

7474

0 commit comments

Comments
 (0)