diff --git a/ui/app/mirrors/create/cdc/cdc.tsx b/ui/app/mirrors/create/cdc/cdc.tsx index 353d988d19..495a406cc5 100644 --- a/ui/app/mirrors/create/cdc/cdc.tsx +++ b/ui/app/mirrors/create/cdc/cdc.tsx @@ -83,10 +83,10 @@ export default function CDCConfigForm({ !isQueue) || (label.includes('staging path') && defaultSyncMode(mirrorConfig.destination?.type) !== 'AVRO') || - (isQueue && + (isQueue && label.includes('soft delete')) || + (mirrorConfig.destination?.type === DBType.EVENTHUBS && (label.includes('initial copy') || label.includes('initial load') || - label.includes('soft delete') || label.includes('snapshot'))) || ((mirrorConfig.source?.type !== DBType.POSTGRES || mirrorConfig.destination?.type !== DBType.POSTGRES) && diff --git a/ui/app/mirrors/create/handlers.ts b/ui/app/mirrors/create/handlers.ts index d924dc2588..1c45210c4d 100644 --- a/ui/app/mirrors/create/handlers.ts +++ b/ui/app/mirrors/create/handlers.ts @@ -25,13 +25,11 @@ import { } from './schema'; export const IsQueuePeer = (peerType?: DBType): boolean => { - if (!peerType) { - return false; - } return ( - peerType === DBType.KAFKA || - peerType === DBType.PUBSUB || - peerType === DBType.EVENTHUBS + !!peerType && + (peerType === DBType.KAFKA || + peerType === DBType.PUBSUB || + peerType === DBType.EVENTHUBS) ); };