Skip to content

Commit ce428d0

Browse files
authored
refactor:added validation in otherCmsUid state variable
1 parent 8407ebc commit ce428d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/src/components/ContentMapper/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R
265265
label: contentTypeMapped?.[otherCmsTitle] ?? `Select ${isContentType ? 'Content Type' : 'Global Field'} from Existing Stack`,
266266
value: contentTypeMapped?.[otherCmsTitle] ?? `Select ${isContentType ? 'Content Type' : 'Global Field'} from Existing Stack`,
267267
});
268-
const [otherCmsUid, setOtherCmsUid] = useState<string>(contentTypes[0]?.otherCmsUid);
268+
const [otherCmsUid, setOtherCmsUid] = useState<string>(contentTypes?.[0]?.otherCmsUid);
269269

270270
const [active, setActive] = useState<number | null>(0);
271271

@@ -2423,4 +2423,4 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R
24232423
});
24242424

24252425
ContentMapper.displayName = 'ContentMapper';
2426-
export default ContentMapper;
2426+
export default ContentMapper;

0 commit comments

Comments
 (0)