From b2a87644c2c48ce194c65b4e320d33bfb8c3cad6 Mon Sep 17 00:00:00 2001 From: carlosjr Date: Wed, 20 Oct 2021 12:07:07 +0200 Subject: [PATCH] fix(starred-module): only available modules can be marked as starred now --- front/salix/components/home/home.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/front/salix/components/home/home.js b/front/salix/components/home/home.js index 7f08b41b73..7a36e1d421 100644 --- a/front/salix/components/home/home.js +++ b/front/salix/components/home/home.js @@ -33,11 +33,11 @@ export default class Controller extends Component { if (!res.data.length) return; for (let starredModule of res.data) { - try { - const module = this.modules.find(mod => mod.name === starredModule.moduleFk); + const module = this.modules.find(mod => mod.name === starredModule.moduleFk); + if (module) { module.starred = true; module.position = starredModule.position; - } catch (error) {} + } } this.countModules(); });