Merge pull request #3624 from dpalou/MOBILE-3535
MOBILE-3535 lesson: Fix undefined attempt if load failsmain
commit
3782ee43c1
|
@ -94,7 +94,7 @@ export class AddonModLessonUserRetakePage implements OnInit {
|
||||||
try {
|
try {
|
||||||
await this.setRetake(retakeNumber);
|
await this.setRetake(retakeNumber);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.selectedRetake = this.previousSelectedRetake;
|
this.selectedRetake = this.previousSelectedRetake ?? this.selectedRetake;
|
||||||
CoreDomUtils.showErrorModal(CoreUtils.addDataNotDownloadedError(error, 'Error getting attempt.'));
|
CoreDomUtils.showErrorModal(CoreUtils.addDataNotDownloadedError(error, 'Error getting attempt.'));
|
||||||
} finally {
|
} finally {
|
||||||
this.loaded = true;
|
this.loaded = true;
|
||||||
|
|
Loading…
Reference in New Issue