Skip to content

Commit 4e946bf

Browse files
authored
Merge pull request #2692 from devtron-labs/fix/condition-container-null-check
fix: null check missing fix
2 parents f22b03e + 276aaa1 commit 4e946bf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/CIPipelineN/ConditionContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const ConditionContainer = ({ type }: { type: ConditionContainerType }) =
4646
const { isConditionDetailsValid, conditionDetails: conditionDetailsError } =
4747
formDataErrorObj[activeStageName].steps[selectedTaskIndex][currentStepTypeVariable]
4848

49-
if (!isConditionDetailsValid) {
49+
if (!isConditionDetailsValid && conditionDetailsError) {
5050
const { conditionDetails } = formData[activeStageName].steps[selectedTaskIndex][currentStepTypeVariable]
5151

5252
const invalidConditionDetailsIds = Object.keys(conditionDetailsError).reduce((acc, key) => {

src/components/common/helpers/Helpers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ export const convertToOptionsList = (
787787
export const importComponentFromFELibrary = (componentName: string, defaultComponent?, type?: 'function') => {
788788
// Adding this check as we do not want to import the component if flag is off
789789
// Using this as a hack, to be removed soon
790-
if (!window._env_.FEATURE_AI_INTEGRATION_ENABLE && componentName === 'ExplainWithAIButton') {
790+
if (!window._env_?.FEATURE_AI_INTEGRATION_ENABLE && componentName === 'ExplainWithAIButton') {
791791
return null
792792
}
793793
try {

0 commit comments

Comments
 (0)