Skip to content

Commit

Permalink
fix(timeline-helper-wrapper): Fix return value in timeline wrapper fo…
Browse files Browse the repository at this point in the history
…r promises (#567)
  • Loading branch information
Vespand committed Jan 8, 2024
1 parent b483fde commit 0645e35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/devtools/src/runtime/function-metrics-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,13 @@ export function __nuxtTimelineWrap(name: string, fn: any) {
try {
if (result && typeof result.then === 'function') {
event.isPromise = true
return result
result
.then((i: any) => i)
.finally(() => {
event.end = Date.now()
return result
})
return result
}
}
catch (e) {}
Expand Down

0 comments on commit 0645e35

Please sign in to comment.