Skip to content

Commit

Permalink
perf_hooks: fix timerify bug
Browse files Browse the repository at this point in the history
  • Loading branch information
iam-frankqiu committed Apr 27, 2022
1 parent 8d0f49c commit bf116ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/perf/timerify.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ function timerify(fn, options = {}) {
const result = constructor ?
ReflectConstruct(fn, args, fn) :
ReflectApply(fn, this, args);
if (!constructor && typeof result?.finally === 'function') {
return result.finally(
if (!constructor && typeof result?.then === 'function') {
return result.then(
FunctionPrototypeBind(
processComplete,
result,
Expand Down

0 comments on commit bf116ae

Please sign in to comment.