From 3c9480538c10c53ed348171e7b9dd0e75abaf93e Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Thu, 27 Jun 2024 09:02:50 +0100 Subject: [PATCH] fix crash --- libs/remix-ui/statusbar/src/lib/components/gitStatus.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/remix-ui/statusbar/src/lib/components/gitStatus.tsx b/libs/remix-ui/statusbar/src/lib/components/gitStatus.tsx index fa93315167..e3a26919ae 100644 --- a/libs/remix-ui/statusbar/src/lib/components/gitStatus.tsx +++ b/libs/remix-ui/statusbar/src/lib/components/gitStatus.tsx @@ -52,7 +52,6 @@ export default function GitStatus({ plugin, gitBranchName, setGitBranchName }: G await plugin.call('dGitProvider', 'init') const isActive = await plugin.call('manager', 'isActive', 'dgit') if (!isActive) await plugin.call('manager', 'activatePlugin', 'dgit') - // plugin.verticalIcons.select('dgit') } return ( @@ -63,10 +62,10 @@ export default function GitStatus({ plugin, gitBranchName, setGitBranchName }: G className="d-flex flex-row pl-3 text-white justify-content-center align-items-center remixui_statusbar_gitstatus" onClick={async () => await lightDgitUp()} > - {gitBranchName.length > 0 && gitBranchName !== 'Not a git repo' ? + {gitBranchName && gitBranchName !== 'Not a git repo' && gitBranchName.length > 0 ? : Initialize as git repo} - {gitBranchName.length > 0 && gitBranchName !== 'Not a git repo' && {gitBranchName}} - {gitBranchName.length > 0 && gitBranchName !== 'Not a git repo' && } + {gitBranchName && gitBranchName !== 'Not a git repo' && gitBranchName.length > 0 && {gitBranchName}} + {gitBranchName && gitBranchName !== 'Not a git repo' && gitBranchName.length > 0 && } )