From f512a73e8ae4b4ac734eb4421c1faa0e7ab89bb8 Mon Sep 17 00:00:00 2001 From: Per-Kristian Nordnes Date: Mon, 30 Aug 2021 15:39:12 +0200 Subject: [PATCH] fix(portable-text-editor): fix bug in value conversion This was introduced when the editor was moved into the monorepo --- packages/@sanity/portable-text-editor/src/utils/values.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/@sanity/portable-text-editor/src/utils/values.ts b/packages/@sanity/portable-text-editor/src/utils/values.ts index 2410df6fea7..2695149e7ea 100644 --- a/packages/@sanity/portable-text-editor/src/utils/values.ts +++ b/packages/@sanity/portable-text-editor/src/utils/values.ts @@ -74,9 +74,10 @@ export function fromSlateValue( const {_type} = child if (_type !== 'span' && typeof child.value === 'object') { hasInlines = true - const {value: _v, _key: _k, _type: _t, ...rest} = child + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const {value: v, _key: k, _type: t, __inline: _i, children: _c, ...rest} = child return keepObjectEquality( - {_key: _k as string, _type: _t as string, ...rest, ..._v}, + {_key: k as string, _type: t as string, ...rest, ...v}, keyMap ) }