ant-design / ant-design/pro-components
🧐[问题] SSR 项目使用ProLayout渲染,在屏幕宽度大于990的时候,可以正常显示,但是小于990宽度,就报错
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
### 🧐 问题描述
SSR 项目使用ProLayout渲染,在屏幕宽度大于990的时候,可以正常显示,但是在屏幕**初始化(设置好宽度,直接刷新)**宽度小于990,就报错 Cannot read properties of null (reading 'children')

我把ProLayout 替换为普通的div,或者ant design 的button 在任意宽度都可以正常显示。
### 版本信息
pro-components :2.7.0
Contributor guide
Research direction
Start by reproducing the ProLayout SSR case at an initial viewport below 990px, using pro-components 2.7.0, and compare it with the same page above 990px. Trace the ProLayout rendering path around the Cannot read properties of null (reading 'children') error; done means the page renders without that error at both viewport sizes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100