Blame SOURCES/simplify-ternar-expression.patch

b75106
From f44cdc871a39da3960bd04565b4d1d5ffa19bd23 Mon Sep 17 00:00:00 2001
b75106
From: Ivan Devat <idevat@redhat.com>
b75106
Date: Thu, 20 Jan 2022 13:32:49 +0100
b75106
Subject: [PATCH 1/2] simplify ternar expression
b75106
b75106
The motivation for this is that covscan complains about it.
b75106
---
b75106
 src/app/view/share/useUrlTabs.ts | 2 +-
b75106
 1 file changed, 1 insertion(+), 1 deletion(-)
b75106
b75106
diff --git a/src/app/view/share/useUrlTabs.ts b/src/app/view/share/useUrlTabs.ts
b75106
index 7278dad8..a1136bf3 100644
b75106
--- a/src/app/view/share/useUrlTabs.ts
b75106
+++ b/src/app/view/share/useUrlTabs.ts
b75106
@@ -13,7 +13,7 @@ export const useUrlTabs = <TABS extends ReadonlyArray<string>>(
b75106
 
b75106
   return {
b75106
     currentTab,
b75106
-    matchedContext: tab !== null ? tab.matched : `/${defaultTab}`,
b75106
+    matchedContext: tab?.matched ?? `/${defaultTab}`,
b75106
     tabList,
b75106
   };
b75106
 };
b75106
-- 
b75106
2.31.1
b75106