-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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: 修改判断,考虑初始绑定的事件为空的情况 #15540
fix: 修改判断,考虑初始绑定的事件为空的情况 #15540
Conversation
1 similar comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感谢 PR~ 这里的判断逻辑不用修改,应该是修改以下代码吧
unstable_batchedUpdates(() => newEventHandler.call(this, e))
改为
unstable_batchedUpdates(() => newEventHandler && newEventHandler.call(this, e))
newEventHandler 和 oldEventHandler 都不存在,应该不用运行到这一步再判断,直接第一步就判断处理,就可以了吧 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15540 +/- ##
==========================================
- Coverage 58.68% 58.62% -0.06%
==========================================
Files 500 500
Lines 21997 21943 -54
Branches 5541 5536 -5
==========================================
- Hits 12909 12865 -44
+ Misses 8139 8040 -99
- Partials 949 1038 +89
Flags with carried forward coverage won't be shown. Click here to find out more. |
要判断,taro 3.6.35 报错了 |
这个 PR 做了什么? (简要描述所做更改)
修改判断,考虑初始绑定的事件为空(没有旧的事件绑定的情况)
这个 PR 是什么类型? (至少选择一个)
这个 PR 涉及以下平台: