Quellcode durchsuchen

Change log hotfix (#3245)

* Change Log UI Hotfix

* Change Log UI Hotfix
sdess09 vor 2 Jahren
Ursprung
Commit
bedbc32e22

+ 18 - 12
dashboard/src/main/home/app-dashboard/expanded-app/ChangeLogComponent.tsx

@@ -70,20 +70,26 @@ const ChangeLogComponent: FC<Props> = ({ oldYaml, newYaml, appData }) => {
         if (path === "global image tag") {
           const oldCommit = difference.lhs;
           const newCommit = difference.rhs;
-          const commitDiffLink = `https://github.com/${appData.app.repo_name}/compare/${oldCommit}...${newCommit}`;
-          changes.push(
-            <ChangeBox type="E">
-              {`Image tag: ${oldCommit} -> ${newCommit}. `}
+          if (appData?.app?.repo_name) {
+            const commitDiffLink = `https://github.com/${appData.app.repo_name}/compare/${oldCommit}...${newCommit}`;
+            changes.push(
+              <ChangeBox type="E">
+                {`Tag upated: ${oldCommit} -> ${newCommit}.   `}
 
-              <Link
-                target="_blank"
-                hasunderline
-                to={commitDiffLink}
-              >
-                View Commit Diff
-              </Link>
+                <Link
+                  target="_blank"
+                  hasunderline
+                  to={commitDiffLink}
+                >
+                  View commit diff
+                </Link>
+              </ChangeBox>
+            );
+          } else {
+            <ChangeBox type="E">
+              {`Tag upated: ${oldCommit} -> ${newCommit}.   `}
             </ChangeBox>
-          );
+          }
         } else {
           changes.push(
             <ChangeBox type="E">