fix: r null checking
This commit is contained in:
parent
f232300aed
commit
05a2defb44
@ -178,7 +178,7 @@ function overrideBuild<F extends Array<any>, R>(
|
|||||||
const r: R = originalFunction.call(this, ...args);
|
const r: R = originalFunction.call(this, ...args);
|
||||||
if (
|
if (
|
||||||
originalFunction.constructor.name === 'AsyncFunction' ||
|
originalFunction.constructor.name === 'AsyncFunction' ||
|
||||||
(typeof r === 'object' && typeof r['then'] === 'function')
|
(r && typeof r === 'object' && typeof r['then'] === 'function')
|
||||||
) {
|
) {
|
||||||
return r['then']((r: any) => {
|
return r['then']((r: any) => {
|
||||||
const resultLogged = Array.isArray(returnsData)
|
const resultLogged = Array.isArray(returnsData)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user