Skip to content

fix: keep nested component links when resolving overrides#370

Merged
tristan-mouchet merged 1 commit into
developfrom
fix/component-link-override-scope
Jun 18, 2026
Merged

fix: keep nested component links when resolving overrides#370
tristan-mouchet merged 1 commit into
developfrom
fix/component-link-override-scope

Conversation

@tristan-mouchet

Copy link
Copy Markdown
Collaborator

Summary

A nested component instance could lose its resolved link (e.g. the login/signup links in the Navigation component rendered without an href) because an outer component override pass re-ran link resolution for link variables it didn't own and stripped them.

Changes

  • Scope link override resolution in applyComponentOverrides to the owning component: only resolve when an override exists for the variable in the current pass or a matching component variable is defined
  • Leave out-of-scope link variable ids untouched so an already-resolved nested link keeps its value

Test plan

  • Render a page with a component that exposes a link variable and verify the link still resolves (correct href)
  • Render a component nested inside another component with link overrides and confirm the inner link is preserved
  • Clear a link via "No link" and confirm the rendered element has no href

An outer component pass could strip a valid link that was already resolved
for a nested component instance, because resolution ran for any linked link
variable regardless of scope. Only resolve when an override exists here or a
matching variable is defined, leaving out-of-scope ids untouched.
@tristan-mouchet tristan-mouchet added the Bug Something isn't working label Jun 18, 2026
@tristan-mouchet tristan-mouchet self-assigned this Jun 18, 2026
@tristan-mouchet tristan-mouchet merged commit df0b300 into develop Jun 18, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant