diff --git a/studio/schemas/documents/redirect.ts b/studio/schemas/documents/redirect.ts index 9c99a2fb1..969643d6b 100644 --- a/studio/schemas/documents/redirect.ts +++ b/studio/schemas/documents/redirect.ts @@ -110,8 +110,10 @@ const redirect = defineType({ if ( typeof sourceSlug !== "string" || typeof destinationType !== "string" || - typeof destinationReferenceSlug !== "string" || - typeof destinationExternalURL !== "string" + (destinationType === "reference" && + typeof destinationReferenceSlug !== "string") || + (destinationType === "external" && + typeof destinationExternalURL !== "string") ) { return {}; }