ui: Handle @ in fqdn function

This commit is contained in:
nemunaire 2024-01-19 16:22:43 +01:00
parent 2420c9c1b4
commit b7f808a17f
1 changed files with 3 additions and 1 deletions

View File

@ -24,7 +24,9 @@ import type { Domain } from '$lib/model/domain';
export const dns_common_types: Array<string> = ['ANY', 'A', 'AAAA', 'NS', 'SRV', 'MX', 'TXT', 'SOA'];
export function fqdn(input: string, origin: string) {
if (input[-1] === '.') {
if (input === '@') {
return origin
} else if (input[-1] === '.') {
return input
} else if (input === '') {
return origin