Skip to content

Commit

Permalink
fix(portable-text-editor): fix bug in value conversion
Browse files Browse the repository at this point in the history
This was introduced when the editor was moved into the monorepo
  • Loading branch information
skogsmaskin committed Aug 30, 2021
1 parent 0a47058 commit f512a73
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/@sanity/portable-text-editor/src/utils/values.ts
Expand Up @@ -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
)
}
Expand Down

2 comments on commit f512a73

@vercel
Copy link

@vercel vercel bot commented on f512a73 Aug 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

test-studio – ./

test-studio.sanity.build
test-studio-git-next.sanity.build

@vercel
Copy link

@vercel vercel bot commented on f512a73 Aug 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

perf-studio – ./

perf-studio-git-next.sanity.build
perf-studio.sanity.build

Please sign in to comment.