fix: r null checking
This commit is contained in:
parent
542e44cdbc
commit
0ceaa93741
2
dist/lib/logged.js
vendored
2
dist/lib/logged.js
vendored
@ -98,7 +98,7 @@ function overrideBuild(originalFunction, baseLogger, metadatas, key, returnsData
|
||||
try {
|
||||
const r = originalFunction.call(this, ...args);
|
||||
if (originalFunction.constructor.name === 'AsyncFunction' ||
|
||||
(typeof r === 'object' && typeof r['then'] === 'function')) {
|
||||
(r && typeof r === 'object' && typeof r['then'] === 'function')) {
|
||||
return r['then']((r) => {
|
||||
const resultLogged = Array.isArray(returnsData)
|
||||
? typeof r === "object"
|
||||
|
Loading…
x
Reference in New Issue
Block a user