mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-31 11:04:20 +01:00
refactor: don't parse twice
This commit is contained in:
@@ -83,7 +83,9 @@ export function extractIdentifier(value: string): string | undefined {
|
||||
return value;
|
||||
}
|
||||
|
||||
if (tldts.parse(value).isIcann && tldts.parse(value).domain) {
|
||||
const { isIcann, domain } = tldts.parse(value);
|
||||
|
||||
if (isIcann && domain) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user