From fe2888889a671d8143a5cb1e809ca26a1909663d Mon Sep 17 00:00:00 2001
From: Heinrichs <Heinrichs@itc.rwth-aachen.de>
Date: Thu, 24 Feb 2022 09:23:22 +0100
Subject: [PATCH] Additional null check

---
 src/modules/project/store.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/project/store.ts b/src/modules/project/store.ts
index 520f6d61..fe7acf7d 100644
--- a/src/modules/project/store.ts
+++ b/src/modules/project/store.ts
@@ -47,14 +47,14 @@ export const useProjectStore = defineStore({
       }
     },
     currentResources(): ResourceObject[] | null {
-      if (this.currentSlug) {
+      if (this.currentSlug && this.visitedProjects[this.currentSlug]) {
         return this.visitedProjects[this.currentSlug].resources;
       } else {
         return null;
       }
     },
     currentSubProjects(): ProjectObject[] | null {
-      if (this.currentSlug) {
+      if (this.currentSlug && this.visitedProjects[this.currentSlug]) {
         return this.visitedProjects[this.currentSlug].subProjects;
       } else {
         return null;
-- 
GitLab