diff --git a/CHANGELOG.md b/CHANGELOG.md index ed08f8f700e954f383fa62c00c0906d721fe1a48..18bd92df4fa669791186c72332a2166ec9fb862f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.8.2](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/compare/v1.8.1...v1.8.2) (2022-03-16) + + +### Bug Fixes + +* **challenges:** Handle case user finished all challenges ([0421e57](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/0421e57d5eaead2ceac3635184c360f6771c8172)) + ### [1.8.1](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/compare/v1.8.0...v1.8.1) (2022-03-09) diff --git a/manifest.webapp b/manifest.webapp index 53c86d0aaba198f890b888a7e8002be3a15cab0e..3c0e67cd55cdace8cab7ef2f294c385eb724df57 100644 --- a/manifest.webapp +++ b/manifest.webapp @@ -3,7 +3,7 @@ "slug": "ecolyo", "icon": "icon.svg", "categories": ["energy"], - "version": "1.8.1", + "version": "1.8.2", "licence": "AGPL-3.0", "editor": "Métropole de Lyon", "default_locale": "fr", diff --git a/package.json b/package.json index cb2977e11e0af5c68951c6151b4bef4db54200e6..3789a22463e4140e478c26557725220026541624 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ecolyo", - "version": "1.8.1", + "version": "1.8.2", "scripts": { "tx": "tx pull --all || true", "lint": "yarn lint:js && yarn lint:styles", diff --git a/src/components/Splash/SplashRoot.tsx b/src/components/Splash/SplashRoot.tsx index b7b56ecd6c0ef9971b97d2d17348c9572fd1e8f7..06d2bb29c92b026243def3c0993654c70156f683 100644 --- a/src/components/Splash/SplashRoot.tsx +++ b/src/components/Splash/SplashRoot.tsx @@ -306,7 +306,7 @@ const SplashRoot = ({ fadeTimer = 1000, children }: SplashRootProps) => { })) } } catch (err) { - if (err instanceof TypeError && !initStepErrors) { + if (err.message === 'Failed to fetch' && !initStepErrors) { setinitStepErrors(InitStepsErrors.UNKNOWN_ERROR) } log.error(`[Initialization] Error : ${err}`) diff --git a/src/services/challenge.service.ts b/src/services/challenge.service.ts index 255e008f2a719ceccb7370a7f217bbba5fed2963..6fc4b25a30c3b479e0c584e6650f335622a8422c 100644 --- a/src/services/challenge.service.ts +++ b/src/services/challenge.service.ts @@ -59,7 +59,10 @@ export default class ChallengeService { userChallenges.forEach((challenge, i) => { if (challenge.state != UserChallengeState.LOCKED) isAllLocked = false if (challenge.state === UserChallengeState.DONE) { - if (userChallenges[i + 1].state === UserChallengeState.LOCKED) { + if ( + userChallenges[i + 1] && + userChallenges[i + 1].state === UserChallengeState.LOCKED + ) { userChallenges[i + 1].state = UserChallengeState.UNLOCKED } }