Skip to content

Commit

Permalink
[field] Improve missing schema type message for InlineObject
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuslundgard authored and rexxars committed Oct 6, 2020
1 parent 656d93b commit 7dda129
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ export function InlineObject({
...restProps
}: InlineObjectProps & React.HTMLProps<HTMLSpanElement>) {
if (!schemaType) {
return <span>Unknown schema type: {object._type}</span>
return (
<span {...restProps} className={styles.root}>
Unknown schema type: {object._type}
</span>
)
}

if (diff) {
Expand Down

0 comments on commit 7dda129

Please sign in to comment.