From a30dd27943a6bbe6456d85e850576f45ad42b858 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Thu, 6 Jul 2023 17:05:57 +0200 Subject: [PATCH] MOBILE-4362 quiz: Fix number type check --- src/addons/mod/quiz/services/handlers/prefetch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/addons/mod/quiz/services/handlers/prefetch.ts b/src/addons/mod/quiz/services/handlers/prefetch.ts index 52b48195d..1849d3b09 100644 --- a/src/addons/mod/quiz/services/handlers/prefetch.ts +++ b/src/addons/mod/quiz/services/handlers/prefetch.ts @@ -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; }