fix: Sidebar links highlighting issue when a template is deleted or archived. (#2420)

This commit is contained in:
Saumya Pandey 2021-08-06 23:01:25 +05:30 committed by GitHub
parent 42b384688d
commit 09b73401de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -149,7 +149,11 @@ function MainSidebar() {
exact={false}
label={t("Templates")}
active={
documents.active ? documents.active.template : undefined
documents.active
? documents.active.isTemplate &&
!documents.active.isDeleted &&
!documents.active.isArchived
: undefined
}
/>
<ArchiveLink documents={documents} />