Skip to content

Commit 0645e35

Browse files
authored
fix(timeline-helper-wrapper): Fix return value in timeline wrapper for promises (#567)
1 parent b483fde commit 0645e35

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/devtools/src/runtime/function-metrics-helpers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,13 @@ export function __nuxtTimelineWrap(name: string, fn: any) {
7676
try {
7777
if (result && typeof result.then === 'function') {
7878
event.isPromise = true
79-
return result
79+
result
8080
.then((i: any) => i)
8181
.finally(() => {
8282
event.end = Date.now()
8383
return result
8484
})
85+
return result
8586
}
8687
}
8788
catch (e) {}

0 commit comments

Comments
 (0)