From 36cb7eaee639ba1e9c9f64fc5e8e65612470f40e Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 8 Oct 2020 10:42:14 +0100 Subject: [PATCH] Fix crashing on creating a record with fields of type link or options due to coercing values --- packages/server/src/api/controllers/record.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/server/src/api/controllers/record.js b/packages/server/src/api/controllers/record.js index 56a272492e..9fa4d818e7 100644 --- a/packages/server/src/api/controllers/record.js +++ b/packages/server/src/api/controllers/record.js @@ -306,6 +306,16 @@ function coerceRecordValues(rec, model) { } const TYPE_TRANSFORM_MAP = { + link: { + "": [], + [null]: [], + [undefined]: undefined, + }, + options: { + "": "", + [null]: "", + [undefined]: undefined, + }, string: { "": "", [null]: "",