-
Notifications
You must be signed in to change notification settings - Fork 164
fix: add mergedData length check #306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add mergedData length check #306
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Walkthrough这次变更调整了 Changes
Sequence Diagram(s)sequenceDiagram
participant R as RawList 函数
participant U as useLayoutEffect 钩子
participant S as 滚动调整逻辑
R->>U: 触发布局更新
U->>U: 检查 startItem 是否定义
alt 条件满足
U->>S: 执行滚动调整
else 条件不满足
U->>U: 跳过滚动调整
end
Possibly related PRs
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
src/List.tsxOops! Something went wrong! :( ESLint: 8.57.1 Error: Cannot read config file: /.eslintrc.js
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Could you make a reproduction link of this problem first? |
If you type 0-321 in order in the search field you can reproduce the error. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #306 +/- ##
==========================================
- Coverage 97.51% 97.27% -0.25%
==========================================
Files 19 19
Lines 806 808 +2
Branches 194 195 +1
==========================================
Hits 786 786
- Misses 20 22 +2 ☔ View full report in Codecov by Sentry. |
|
Problem
When
mergedData
updates rapidly, an issue occurs inrc-virtual-list
where the component behaves unexpectedly due to missing length validation.reproduce link: https://codepen.io/hk-s/pen/dPyOxKx?editors=0011
Solution
Added a length check for
mergedData
in theif
condition to prevent this issue.Summary by CodeRabbit
更新后的发布说明