Skip to content

Commit 47155a3

Browse files
Fix initial build button shortcut on security node (#3205)
Signed-off-by: Franck LECUYER <[email protected]>
1 parent 65ef39b commit 47155a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/graph/nodes/build-button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const BuildButton = ({ buildStatus, studyUuid, currentRootNetworkUuid, no
4343

4444
setIsLoading(true);
4545

46-
if (buildStatus === BUILD_STATUS.NOT_BUILT) {
46+
if (!buildStatus || buildStatus === BUILD_STATUS.NOT_BUILT) {
4747
buildNode(studyUuid, nodeUuid, currentRootNetworkUuid)
4848
.catch((error) => {
4949
if (error.status === 403 && error.message.includes(HTTP_MAX_NODE_BUILDS_EXCEEDED_MESSAGE)) {
@@ -83,7 +83,7 @@ export const BuildButton = ({ buildStatus, studyUuid, currentRootNetworkUuid, no
8383
if (isLoading) {
8484
return <CircularProgress size={24} color="primary" />;
8585
}
86-
return buildStatus === BUILD_STATUS.NOT_BUILT ? (
86+
return !buildStatus || buildStatus === BUILD_STATUS.NOT_BUILT ? (
8787
<PlayCircleFilled sx={styles.playColor} />
8888
) : (
8989
<StopCircleOutlined color="primary" />

0 commit comments

Comments
 (0)