*put getter check outside async
This commit is contained in:
parent
a9dcbaecee
commit
26dd88fb5c
|
@ -147,13 +147,12 @@ export const factory = function <T extends Client = Client>(
|
|||
if (typeof prop !== "function") {
|
||||
return prop;
|
||||
}
|
||||
}
|
||||
return async (...args: any[]): Promise<any> => {
|
||||
await target.loadLibs(module);
|
||||
|
||||
if (desc?.get) {
|
||||
return target[property as keyof T];
|
||||
}
|
||||
}
|
||||
return async (...args: any[]): Promise<any> => {
|
||||
await target.loadLibs(module);
|
||||
|
||||
return (target[property as keyof T] as Function)(...args);
|
||||
};
|
||||
|
|
Reference in New Issue