mirror of
https://github.com/tale/headplane.git
synced 2026-08-11 14:26:56 +00:00
fix: properly handle removing the last split dns record
Previously it would set the value to an empty array, breaking DNS resolution for that split completely. The correct behavior was to remove the key altogether! This fixes #231
This commit is contained in:
@@ -104,7 +104,7 @@ async function removeNs(formData: FormData, context: LoadContext) {
|
||||
await context.hs.patch([
|
||||
{
|
||||
path: `dns.nameservers.split."${splitName}"`,
|
||||
value: servers,
|
||||
value: servers.length > 0 ? servers : null,
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user