Skip to content

Markdown links and table cells render node="[object Object]" #820

Description

@rickstaa

Every link and table cell rendered through MarkdownRenderer (treasury proposals, governance polls, proposal preview) gets a junk node="[object Object]" attribute, e.g. <a href="https://…" node="[object Object]">.

react-markdown passes each custom component its AST node alongside the element's attributes. Our custom a, th and td in components/MarkdownRenderer/index.tsx spread all props onto the DOM element, so node ends up as an HTML attribute.

Fix: destructure node out before spreading in all three components. The discarded variable trips @typescript-eslint/no-unused-vars (lint allows zero warnings), so either set ignoreRestSiblings: true for that rule in eslint.config.mjs (preferred, standard for this pattern) or add targeted disable comments.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions