From 7be8e08cbb3613a0b3f4634506dda9541244edd1 Mon Sep 17 00:00:00 2001 From: "Cornelius A. Ludmann" Date: Tue, 15 Jun 2021 12:19:24 +0000 Subject: [PATCH] [db] Handle `null` in MAP_EMPTY_STR_TO_UNDEFINED --- components/gitpod-db/src/typeorm/transformer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/gitpod-db/src/typeorm/transformer.ts b/components/gitpod-db/src/typeorm/transformer.ts index 68a74d3cb98b63..7aa22ae9c4db44 100644 --- a/components/gitpod-db/src/typeorm/transformer.ts +++ b/components/gitpod-db/src/typeorm/transformer.ts @@ -11,7 +11,7 @@ import { EncryptionService } from "@gitpod/gitpod-protocol/lib/encryption/encryp export namespace Transformer { export const MAP_EMPTY_STR_TO_UNDEFINED: ValueTransformer = { to(value: any): any { - if (value === undefined) { + if (value === undefined || value === null) { return ''; } return value;