Skip to content

fix: correct always-true condition in renderNestedTag#115

Closed
andrerfneves wants to merge 1 commit into
mainfrom
maintenance/fix-render-nested-tag-condition-20260601
Closed

fix: correct always-true condition in renderNestedTag#115
andrerfneves wants to merge 1 commit into
mainfrom
maintenance/fix-render-nested-tag-condition-20260601

Conversation

@andrerfneves

Copy link
Copy Markdown
Owner

Summary

The condition in the method was a tautology: is always true because a value cannot be both a string and a number simultaneously.

This caused the 'Objects' rendering branch to execute for strings, treating them as objects via , which produced individual character keys and duplicate rendering alongside the correct string branch.

Changes

  • Replaced the tautological OR with a proper AND chain:
  • The object branch now only renders when is genuinely an object

Test Plan

  • Code review confirms the condition is now correct
  • String data will no longer be rendered as objects

The condition
is always true because a value cannot be both a string and a number simultaneously.
This caused strings to be rendered as objects (via Object.keys), producing
individual character keys and duplicate rendering.

Replace the tautological OR with a proper AND chain so the object branch only
renders when tag.data is genuinely an object.
@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lightning-decoder Ready Ready Preview, Comment Jun 1, 2026 12:01am

@andrerfneves

Copy link
Copy Markdown
Owner Author

Closing as obsolete after the shadcn/Tailwind migration was merged. This PR targets src/app.jsx, which no longer exists on main; the nested result rendering code was replaced by the new InvoiceDetails component.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant