Skip to content

Commit c360cae

Browse files
committed
fix(RequestHandler): Set Base URL
1 parent 9b05ae1 commit c360cae

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/Private/RequestHandler.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,7 @@ class RequestHandler {
1212
}
1313

1414
setBaseURL(url: string = 'https://api.hypixel.net/v2'): this {
15-
if (
16-
!url.startsWith('http') ||
17-
!url.includes('://') ||
18-
(url.includes('.') && url.includes(':')) ||
19-
(!url.includes('.') && !url.includes(':'))
20-
) {
21-
throw new Error(Errors.INVALID_BASE_URL);
22-
}
23-
15+
if (!url.startsWith('http') || !url.includes('://')) throw new Error(Errors.INVALID_BASE_URL);
2416
if (url.endsWith('/')) throw new Error(Errors.INVALID_BASE_URL_SLASH);
2517
this.BASE_URL = url;
2618
return this;

0 commit comments

Comments
 (0)