From b66eae82b98640fb94971eef1f61577a9b6af793 Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Fri, 27 Oct 2023 15:53:15 +0200 Subject: [PATCH] Missing code smell fix --- projects/aca-shared/rules/src/app.rules.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/projects/aca-shared/rules/src/app.rules.ts b/projects/aca-shared/rules/src/app.rules.ts index a77daaad66..9659103723 100644 --- a/projects/aca-shared/rules/src/app.rules.ts +++ b/projects/aca-shared/rules/src/app.rules.ts @@ -299,8 +299,7 @@ export const hasLibrarySelected = (context: RuleContext): boolean => !!context.s * JSON ref: `app.selection.isPrivateLibrary` */ export function isPrivateLibrary(context: RuleContext): boolean { - const library = context.selection.library; - return library ? !!(library.entry?.visibility === 'PRIVATE') : false; + return context.selection.library?.entry?.visibility === 'PRIVATE'; } /**