Skip to content

BeechCMS


BeechCMS / @beechcms/core / resolveRelationAvatar

Function: resolveRelationAvatar() ​

resolveRelationAvatar(branch, lookup): Branch | null

The target-seed branch that supplies a relation's avatar image, or null when the relation has no avatar configured or the configuration no longer resolves (target gone, field renamed, retyped, hidden). Callers treat null as "no avatar" — a stale avatarSource degrades, it never throws.

Parameters ​

branch ​

Branch

The relation branch carrying avatarSource.

lookup ​

SeedLookup

Resolves the relation target.

Returns ​

Branch | null