MOBILE-4362 quiz: Fix number type check

main
Noel De Martin 2023-07-06 17:05:57 +02:00
parent 5f66401a52
commit a30dd27943
1 changed files with 1 additions and 1 deletions

View File

@ -447,7 +447,7 @@ export class AddonModQuizPrefetchHandlerService extends CoreCourseActivityPrefet
if (attempt.state == AddonModQuizProvider.ATTEMPT_IN_PROGRESS) {
// Get data for each page.
promises = promises.concat(pages.map(async (page) => {
if (isSequential && attempt.currentpage && page < attempt.currentpage) {
if (isSequential && typeof attempt.currentpage === 'number' && page < attempt.currentpage) {
// Sequential quiz, cannot get pages before the current one.
return;
}