Skip to content

Commit

Permalink
[types] Relax titled list option check, allow additional attributes
Browse files Browse the repository at this point in the history
Fixes #2088
  • Loading branch information
rexxars authored and mariuslundgard committed Jan 26, 2021
1 parent 984b6b4 commit caba45e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/@sanity/types/src/schema/asserters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,5 @@ export function isReferenceSchemaType(
}

export function isTitledListValue(item: unknown): item is TitledListValue {
return (
typeof item === 'object' &&
item !== null &&
'title' in item &&
'value' in item &&
Object.keys(item).length === 2
)
return typeof item === 'object' && item !== null && 'title' in item && 'value' in item
}

0 comments on commit caba45e

Please sign in to comment.