Skip to content

Commit

Permalink
fix(desk): update getSchemaType in ListItemBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanwikner authored and rexxars committed Sep 14, 2022
1 parent 206c188 commit ad7d724
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/sanity/src/desk/structureBuilder/ListItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ export class ListItemBuilder implements Serializable<ListItem> {
}

getSchemaType(): PartialListItem['schemaType'] {
const schemaType = this.spec.schemaType

if (typeof schemaType === 'string') {
return this._context.schema.get(schemaType)
}

return this.spec.schemaType
}

Expand Down

0 comments on commit ad7d724

Please sign in to comment.