forgot about this

I don't know how, but yeah
This commit is contained in:
kmmiio99o 2025-12-22 19:57:36 +01:00
parent 9998c25cf5
commit 789c942a00
No known key found for this signature in database
GPG key ID: 13A107AB06ACF9FA

View file

@ -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);
}