Skip to content

Commit

Permalink
πŸ› Improve validation #1438
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandolucchesi committed Jan 19, 2023
1 parent dacd7b2 commit 5c5eceb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion studio/schemas/objects/linkSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const LinkField = {
Rule.custom(async (value: any, context: ValidationContext) => {
const { parent, document } = context as { parent: LinkSelector; document: { _lang?: string } }
if (parent.linkToOtherLanguage) return true
if (Flags.IS_DEV && value._ref) {
if (Flags.IS_DEV && value?._ref) {
const referenceLang = await client.fetch(
/* groq */ `*[_id == $id][0]{"lang": coalesce(content->_lang, _lang)}.lang`,
{
Expand Down

0 comments on commit 5c5eceb

Please sign in to comment.