From 213c5eecec0c49f80693e4f18fa752de3cbf2f57 Mon Sep 17 00:00:00 2001 From: Ally Founder Date: Sat, 8 Aug 2026 01:48:50 -0400 Subject: [PATCH] BetterTimestamps: Trap toJSON so the native row bridge gets the formatted string --- plugins/better-timestamps/src/patches/rowManager.ts | 2 +- plugins/better-timestamps/src/patches/timestamp.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/better-timestamps/src/patches/rowManager.ts b/plugins/better-timestamps/src/patches/rowManager.ts index 322e81c..3ea5a33 100644 --- a/plugins/better-timestamps/src/patches/rowManager.ts +++ b/plugins/better-timestamps/src/patches/rowManager.ts @@ -10,7 +10,7 @@ function wrapTimestamp(original: any): any { if (typeof Proxy === "undefined") return getFormatted(); return new Proxy(original, { get(target, prop) { - if (prop === "format" || prop === "calendar" || prop === "fromNow" || prop === "toISOString" || prop === "toString") { + if (prop === "format" || prop === "calendar" || prop === "fromNow" || prop === "toISOString" || prop === "toString" || prop === "toJSON") { return getFormatted; } const value = target[prop]; diff --git a/plugins/better-timestamps/src/patches/timestamp.ts b/plugins/better-timestamps/src/patches/timestamp.ts index 9da16e0..95cb64b 100644 --- a/plugins/better-timestamps/src/patches/timestamp.ts +++ b/plugins/better-timestamps/src/patches/timestamp.ts @@ -10,7 +10,7 @@ function wrapTimestamp(original: any): any { if (typeof Proxy === "undefined") return getFormatted(); return new Proxy(original, { get(target, prop) { - if (prop === "format" || prop === "calendar" || prop === "fromNow" || prop === "toISOString" || prop === "toString") { + if (prop === "format" || prop === "calendar" || prop === "fromNow" || prop === "toISOString" || prop === "toString" || prop === "toJSON") { return getFormatted; } const value = target[prop];