*Cast supported due to overload

This commit is contained in:
Derrick Hammer 2023-02-19 20:02:24 -05:00
parent 6973f7218b
commit 68640a2bb8
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -51,8 +51,8 @@ export abstract class AbstractResolverModule {
isTldSupported(domain: string): Promise<boolean>;
isTldSupported(domain: string): boolean;
isTldSupported(domain: string): any {
let supported = this.getSupportedTlds();
if (isPromise(supported as Promise<string[]>)) {
let supported = this.getSupportedTlds() as any;
if (isPromise(supported)) {
return (supported as Promise<string[]>).then((supported: string[]) => {
return supported.includes(getTld(domain));
});