fix(server-renderer): omit nullish class and style attrs#14930
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR fixes SSR attribute rendering to skip ChangesNullish class and style attribute handling in SSR
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
Size ReportBundles
Usages
|
|
duplicate of #13745 |
Fixes #13228.\n\nssrRenderAttrs already skips nullish values for regular attrs, but class and style are special-cased and were rendered as empty attributes. This skips class/style when their raw value is null or undefined while preserving existing array/object normalization for non-nullish values.\n\nTest: pnpm vitest packages/server-renderer/tests/ssrRenderAttrs.spec.ts --run
Summary by CodeRabbit
nullandundefinedvalues forclassandstyleattributes, preventing empty attribute emissions in the rendered output.