Skip to content

[General] [Fixed] - Fix missing format specifier in renderApplication invariant#56329

Open
w3di wants to merge 1 commit intofacebook:mainfrom
w3di:fix/invariant-missing-format-specifier
Open

[General] [Fixed] - Fix missing format specifier in renderApplication invariant#56329
w3di wants to merge 1 commit intofacebook:mainfrom
w3di:fix/invariant-missing-format-specifier

Conversation

@w3di
Copy link
Copy Markdown

@w3di w3di commented Apr 4, 2026

Summary

The invariant call in renderApplication passes rootTag as a substitution argument, but the format string has no %s placeholder. When the invariant fails, the error message reads:

Expect to have a valid rootTag, instead got

instead of:

Expect to have a valid rootTag, instead got null

The value is silently dropped, making the error less useful for debugging.

Changelog:

[General] [Fixed] - Fix missing format specifier in renderApplication invariant

Test Plan

  • Verified with invariant directly: without %s the third argument is ignored, with %s it is substituted into the message.
  • Prettier and ESLint checks pass.

… invariant

The invariant call passes rootTag as a substitution argument but the
format string has no %s placeholder, so the error message never shows
the actual value of rootTag.
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 4, 2026
@facebook-github-tools facebook-github-tools bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant