Skip to content

Commit

Permalink
fix: add optional link fields to link to media migration fields
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloashmore committed Dec 17, 2024
1 parent c0f32ef commit 6f89eee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/isMigrationValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ export const image = (value: UnknownValue): value is MigrationImage => {
/**
* Checks if a value is a migration link to media field.
*
* @remarks
* `OptionalLinkProperties` is included because `MigrationContentRelationship`
* may be a link field, not strictly a content relationship field.
*
* @param value - Value to check.
*
* @returns `true` if `value` is a migration link to media field, `false`
Expand All @@ -95,7 +99,7 @@ export const image = (value: UnknownValue): value is MigrationImage => {
*/
export const linkToMedia = (
value: UnknownValue,
): value is MigrationLinkToMedia => {
): value is MigrationLinkToMedia & OptionalLinkProperties => {
return (
typeof value === "object" &&
value !== null &&
Expand Down

0 comments on commit 6f89eee

Please sign in to comment.