aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src/promisify.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/utils/src/promisify.ts')
-rw-r--r--packages/utils/src/promisify.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/utils/src/promisify.ts b/packages/utils/src/promisify.ts
index 29d626b61..e82251a0f 100644
--- a/packages/utils/src/promisify.ts
+++ b/packages/utils/src/promisify.ts
@@ -10,7 +10,7 @@ export function promisify<T>(originalFn: (...args: any[]) => void, thisArg?: any
const promisifiedFunction = async (...callArgs: any[]): Promise<T> => {
return new Promise<T>((resolve, reject) => {
const callback = (err: Error | null, data?: T) => {
- _.isNull(err) ? resolve(data) : reject(err);
+ _.isNull(err) || _.isUndefined(err) ? resolve(data) : reject(err);
};
originalFn.apply(thisArg, [...callArgs, callback]);
});