Skip to content

Commit

Permalink
Lectures: Fix an issue with undefined units when processing lecture u…
Browse files Browse the repository at this point in the history
…nits (#9452)
  • Loading branch information
eceeeren authored Oct 12, 2024
1 parent e4a4e2f commit 753f497
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ <h2 id="page-heading">
/>
</div>
</div>
@if (units && units.length < 1) {
@if (units.length < 1) {
<div class="alert alert-danger mt-3">
<fa-icon [icon]="faExclamationTriangle" />
{{ 'artemisApp.attachmentUnit.createAttachmentUnits.noUnitDetected' | artemisTranslate }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class AttachmentUnitsComponent implements OnInit {
)
.subscribe({
next: (res) => {
this.units = res.body!.units;
this.units = res.body!.units || this.units;
this.numberOfPages = res.body!.numberOfPages;
this.isLoading = false;
},
Expand Down

0 comments on commit 753f497

Please sign in to comment.