mirror of
https://github.com/Xevion/rdap.git
synced 2025-12-06 03:16:07 -06:00
Check for empty string on matching empty target string
This commit is contained in:
@@ -135,7 +135,7 @@ const useLookup = (warningHandler?: WarningHandler) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function submitInternal(): Promise<ParsedGeneric | undefined> {
|
async function submitInternal(): Promise<ParsedGeneric | undefined> {
|
||||||
if (target == null)
|
if (target == null || target.length == 0)
|
||||||
throw new Error("A target must be given in order to execute a lookup.");
|
throw new Error("A target must be given in order to execute a lookup.");
|
||||||
|
|
||||||
const targetType = getType(target);
|
const targetType = getType(target);
|
||||||
@@ -173,9 +173,9 @@ const useLookup = (warningHandler?: WarningHandler) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function submit(
|
async function submit({
|
||||||
props: SubmitProps
|
target,
|
||||||
): Promise<ParsedGeneric | undefined> {
|
}: SubmitProps): Promise<ParsedGeneric | undefined> {
|
||||||
try {
|
try {
|
||||||
const response = await submitInternal();
|
const response = await submitInternal();
|
||||||
if (response == undefined)
|
if (response == undefined)
|
||||||
|
|||||||
Reference in New Issue
Block a user