From 45a7be6641d7af08dcaea2ffeb5f5065ced02a15 Mon Sep 17 00:00:00 2001 From: Mathieu Suen Date: Wed, 15 Sep 2021 10:30:18 +0200 Subject: [PATCH] SONAR-15177 Fix no code info when showing source viewer --- .../sonar-web/src/main/js/apps/code/components/CodeApp.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/code/components/CodeApp.tsx b/server/sonar-web/src/main/js/apps/code/components/CodeApp.tsx index fef599b7fee..9c8518ea8c4 100644 --- a/server/sonar-web/src/main/js/apps/code/components/CodeApp.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/CodeApp.tsx @@ -255,7 +255,7 @@ export class CodeApp extends React.PureComponent { const showSearch = searchResults !== undefined; - const hasNoFile = components.length === 0 && searchResults === undefined; + const hasComponents = components.length === 0 && searchResults === undefined; const shouldShowBreadcrumbs = breadcrumbs.length > 1 && !showSearch; const shouldShowComponentList = @@ -280,7 +280,7 @@ export class CodeApp extends React.PureComponent { /> - {!hasNoFile && ( + {!hasComponents && ( { )}
- {hasNoFile && ( + {hasComponents && sourceViewer === undefined && (
{translate( -- 2.39.5