BetterTimestamps: Intercept toString for string-coerced timestamps
This commit is contained in:
parent
ff50efbdf9
commit
615cbd2a08
1 changed files with 1 additions and 1 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") {
|
||||
if (prop === "format" || prop === "calendar" || prop === "fromNow" || prop === "toISOString" || prop === "toString") {
|
||||
return getFormatted;
|
||||
}
|
||||
const value = target[prop];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue