forgot about this
I don't know how, but yeah
This commit is contained in:
parent
9998c25cf5
commit
789c942a00
1 changed files with 1 additions and 1 deletions
|
|
@ -125,7 +125,7 @@ export function wrap<T extends (...a: any[]) => any>(name: string, fn: T): T {
|
|||
return res;
|
||||
} finally {
|
||||
// for synchronous returns, ensure timing recorded in finally above won't double-record.
|
||||
if (!(fn as any).constructor.name === "AsyncFunction") {
|
||||
if ((fn as any).constructor?.name !== "AsyncFunction") {
|
||||
const duration = Math.max(0, now() - t0);
|
||||
record(name, duration);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue