From e3e176410690b3f253c102988c8bcc4512689955 Mon Sep 17 00:00:00 2001 From: Max Korsunov Date: Mon, 9 Dec 2024 18:40:44 +0400 Subject: [PATCH] fix: serialize dates too --- src/shared/utils/serializer.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/shared/utils/serializer.ts b/src/shared/utils/serializer.ts index afda65dc..a2ae6fd5 100644 --- a/src/shared/utils/serializer.ts +++ b/src/shared/utils/serializer.ts @@ -26,6 +26,10 @@ export const serialize = (value: VAL): Serialized => { return value.map(v => serialize(v) as Serialized) as Serialized; } + if (value instanceof Date) { + return value.toString() as Serialized; + } + if (isMessage(value)) { return { proto: value.getType().typeName,