Skip to content

Commit

Permalink
fix: correctly handle vue keys from portable text
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Nov 11, 2020
1 parent f7040a4 commit 9e6ca61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/sanity-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ function getProps (item?: Record<string, any>) {
const obj = Object.entries(item).reduce(
(obj, [key, value]) => {
switch (true) {
case (['key'] as Array<keyof VNodeData>).includes(
key as keyof VNodeData,
case (['_key', 'key']).includes(
key,
):
obj[key as keyof VNodeData] = value
obj.key = value
return obj

case ['class', 'href'].includes(key):
Expand Down

0 comments on commit 9e6ca61

Please sign in to comment.