From e8e6f9b6d79e943eb0fd86d950fd3f262a6e3006 Mon Sep 17 00:00:00 2001 From: rijkvanzanten Date: Fri, 24 Jul 2020 15:41:29 -0400 Subject: [PATCH] Fix local staging --- src/stores/fields/fields.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/stores/fields/fields.ts b/src/stores/fields/fields.ts index aa047623f5..36428d27b0 100644 --- a/src/stores/fields/fields.ts +++ b/src/stores/fields/fields.ts @@ -8,7 +8,7 @@ import formatTitle from '@directus/format-title'; import notify from '@/utils/notify'; import useRelationsStore from '@/stores/relations'; import { Relation } from '@/stores/relations/types'; -import getLocalType from '@/utils/get-local-type'; +import { merge } from 'lodash'; const fakeFilesField: Field = { collection: 'directus_files', @@ -198,10 +198,7 @@ export const useFieldsStore = createStore({ const updatesForThisField = updates.find((update) => update.field === field.field); if (updatesForThisField) { - return { - ...field, - ...updatesForThisField, - }; + return merge({}, field, updatesForThisField); } }