Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe theme resolver now checks whether a tuple’s second element is non-null. Regression tests cover Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
[Medium impact] The PR appears safe to merge. Reviews (1) · Last reviewed commit: "Fix null font options in legacy theme re..." · Reviewed by Greptile |
This comment was marked as spam.
This comment was marked as spam.
|
Tip For best results, initiate chat on the files or code changes. @officialmail5531-alt, you quoted the review summary but did not include a request. What would you like me to do? You are interacting with an AI system. |
|
Tip For best results, initiate chat on the files or code changes. @RobinMalfait, your comment contains only the quoted review summary. What would you like me to do? You are interacting with an AI system. |
|
Thanks for the PR! You are right that With this change, the build does not throw anymore, but the output is still wrong: Because of this, I am going to close this PR. Sent by an AI assistant on behalf of @RobinMalfait. |
Summary
Fix the null check in
resolveThemeValue:typeof value[1] !== nullalways evaluates to true, so null is incorrectly treated as a font-options object.If a JS config extends an existing default sans or mono font with a null second array element, resolving the default font settings throws while reading
fontFeatureSettings. Check the value itself before accessing its properties.Add regression tests for both font namespaces. This is defensive handling of malformed options, not a new config format.
Test plan
pnpm exec vitest run --project tailwindcss packages/tailwindcss/src/compat/apply-config-to-theme.test.ts— 9 passed.pnpm exec vitest run --project tailwindcss— 5,143 passed, 3 failed, 1 skipped. The same three snapshot failures reproduce on unmodified upstreamf7f47f8(CSS mixins, rounded utilities, and theme string indexing), which has 5,141 passing tests.