Explorar o código

Fix conditional on branch list

jnfrati %!s(int64=4) %!d(string=hai) anos
pai
achega
a86f6dd7a7
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      dashboard/src/components/repo-selector/BranchList.tsx

+ 4 - 1
dashboard/src/components/repo-selector/BranchList.tsx

@@ -24,8 +24,11 @@ const BranchList: React.FC<Props> = ({ setBranch, actionConfig }) => {
 
   useEffect(() => {
     // Get branches
+    if (!actionConfig) {
+      return () => {};
+    }
 
-    if (actionConfig.git_repo_id !== 0) {
+    if (actionConfig?.kind === "github") {
       api
         .getBranches(
           "<token>",