From 134b43506f159fa7afa4fe41ba60f89a76c75a56 Mon Sep 17 00:00:00 2001 From: Mitan Omar Date: Thu, 20 Apr 2023 17:36:36 +0200 Subject: [PATCH] fix(activities): check for active tracking state (#912) --- app/services/tracking.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/services/tracking.js b/app/services/tracking.js index 25f3ca48c..16a912f42 100644 --- a/app/services/tracking.js +++ b/app/services/tracking.js @@ -224,15 +224,17 @@ export default class TrackingService extends Service { } get activeCustomer() { - return this.activity?.task?.get("project.customer"); + return ( + this.hasActiveActivity && this.activity?.task?.get("project.customer") + ); } get activeProject() { - return this.activity?.task?.get("project"); + return this.hasActiveActivity && this.activity?.task?.get("project"); } get activeTask() { - return this.activity?.get("task"); + return this.hasActiveActivity && this.activity?.get("task"); } /**