From 375ff84773d5715d7164a3df9ec7fd87c3c3f434 Mon Sep 17 00:00:00 2001 From: Hector Correa Date: Wed, 15 Jan 2025 16:59:43 -0500 Subject: [PATCH] Added guard to the JavaScript --- app/javascript/entrypoints/dashboardTabs.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/javascript/entrypoints/dashboardTabs.js b/app/javascript/entrypoints/dashboardTabs.js index 72025acf..1ea7aaad 100644 --- a/app/javascript/entrypoints/dashboardTabs.js +++ b/app/javascript/entrypoints/dashboardTabs.js @@ -18,9 +18,11 @@ export function dashStyle(railsSession) { admin.classList.add('active'); break; default: - project.style.borderBottom = 'solid'; - project.style.borderColor = '#E77500'; - project.classList.add('active'); + if (project !== null) { + project.style.borderBottom = 'solid'; + project.style.borderColor = '#E77500'; + project.classList.add('active'); + } break; } }