From 4cff3f430581fe5c7400ff5966efdc4fccd65775 Mon Sep 17 00:00:00 2001 From: Guilhem CARRON <gcarron@grandlyon.com> Date: Wed, 16 Mar 2022 10:33:38 +0000 Subject: [PATCH] chore(release): 1.8.2 --- CHANGELOG.md | 7 +++++++ manifest.webapp | 2 +- package.json | 2 +- src/components/Splash/SplashRoot.tsx | 2 +- src/services/challenge.service.ts | 5 ++++- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed08f8f70..18bd92df4 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 53c86d0aa..3c0e67cd5 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 cb2977e11..3789a2246 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 b7b56ecd6..06d2bb29c 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 255e008f2..6fc4b25a3 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 } } -- GitLab