fix(components): 修复@trao/components swiper组件销毁时的报错#19353
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Walkthrough在 ChangeswrapperEl 空值保护及测试
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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
ESLint install timed out. The project may have too many dependencies for the sandbox. 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 |
这个 PR 做了什么? (简要描述所做更改)
TypeError. Cannot read properties of undefined (reading 'children'). in e.loopDestroy at line 2:60102
Swiper 在
circular模式下,外部子节点变化时会先调用loopDestroy()恢复 DOM 顺序,再重新初始化。
但在某些场景下,Swiper 内部的 wrapper 节点可能已经被移除或重置,此时继续调用
loopDestroy()会导致 Swiper 内部访问 wrapper children 时抛错。
这个 PR 是什么类型? (至少选择一个)
这个 PR 涉及以下平台:
Summary by CodeRabbit
发布说明