MOBILE-3535 lesson: Fix undefined attempt if load fails
This commit is contained in:
parent
5646dd14e0
commit
6018868c75
@ -94,7 +94,7 @@ export class AddonModLessonUserRetakePage implements OnInit {
|
||||
try {
|
||||
await this.setRetake(retakeNumber);
|
||||
} catch (error) {
|
||||
this.selectedRetake = this.previousSelectedRetake;
|
||||
this.selectedRetake = this.previousSelectedRetake ?? this.selectedRetake;
|
||||
CoreDomUtils.showErrorModal(CoreUtils.addDataNotDownloadedError(error, 'Error getting attempt.'));
|
||||
} finally {
|
||||
this.loaded = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user