From 4004c277e7f31ee62e311fc33c713665590c5272 Mon Sep 17 00:00:00 2001 From: noah Date: Sat, 8 Jan 2022 16:19:57 +0900 Subject: [PATCH] Fix the bug for env badge --- ui/src/redux/repoDeploy.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ui/src/redux/repoDeploy.tsx b/ui/src/redux/repoDeploy.tsx index ed3e913e..98c84d2c 100644 --- a/ui/src/redux/repoDeploy.tsx +++ b/ui/src/redux/repoDeploy.tsx @@ -344,9 +344,7 @@ export const repoDeploySlice = createSlice({ state.config = config }) .addCase(fetchCurrentDeploymentOfEnv.fulfilled, (state, action) => { - if (action.payload) { - state.currentDeployment = action.payload - } + state.currentDeployment = action.payload? action.payload : undefined }) .addCase(fetchCurrentDeploymentOfEnv.rejected, (state) => { state.currentDeployment = undefined