From 098fc7f7c77b3d2b3e8759ee623d5e1fc03ad4af Mon Sep 17 00:00:00 2001 From: alphaeusmote <41258468-alphaeusmote@users.noreply.replit.com> Date: Thu, 10 Apr 2025 15:03:44 +0000 Subject: [PATCH] Fix: Handle "None" provider selection in DNS record management. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/62bba02a-dc54-4742-a2dc-90482cad273d.jpg --- client/src/pages/dns-records.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/pages/dns-records.tsx b/client/src/pages/dns-records.tsx index bc4ef46..4e31458 100644 --- a/client/src/pages/dns-records.tsx +++ b/client/src/pages/dns-records.tsx @@ -168,7 +168,7 @@ export default function DnsRecordsPage() { if (!domainId) throw new Error("Domain ID is required"); // Convert empty providerId to null - const providerId = data.providerId === "" ? null : data.providerId; + const providerId = data.providerId === "" || data.providerId === "none" ? null : data.providerId; const recordData: InsertDnsRecord = { ...data, @@ -204,7 +204,7 @@ export default function DnsRecordsPage() { const updateRecordMutation = useMutation({ mutationFn: async ({ id, data }: { id: string, data: z.infer }) => { // Convert empty providerId to null - const providerId = data.providerId === "" ? null : data.providerId; + const providerId = data.providerId === "" || data.providerId === "none" ? null : data.providerId; const updatedData = { ...data, @@ -518,7 +518,7 @@ export default function DnsRecordsPage() { - None + None {providers.map((provider) => ( - None + None {providers.map((provider) => (