BetterTimestamps: Trap toJSON so the native row bridge gets the formatted string
This commit is contained in:
parent
6d872fd3b8
commit
213c5eecec
2 changed files with 2 additions and 2 deletions
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue