Skip to content

fix: check if element of popover exists when delayed hidden#2764

Merged
winjo merged 1 commit intomainfrom
fix/popover-hide
May 30, 2023
Merged

fix: check if element of popover exists when delayed hidden#2764
winjo merged 1 commit intomainfrom
fix/popover-hide

Conversation

@winjo
Copy link
Copy Markdown
Contributor

@winjo winjo commented May 30, 2023

Types

  • 🐛 Bug Fixes

Background or solution

🤖 Generated by Copilot at 0cb6734

  • Add a null check for contentEl.current to avoid errors when the popover is unmounted (link)

Changelog

🤖 Generated by Copilot at 0cb6734

Fix a potential error in Popover component when unmounting. Add a null check for contentEl.current in hideContent function.

@winjo winjo requested a review from Ricbet May 30, 2023 09:15
@opensumi opensumi Bot added the 🐞 bug Something isn't working label May 30, 2023
@opensumi
Copy link
Copy Markdown
Contributor

opensumi Bot commented May 30, 2023

ChatGPT Code Review:

  1. 建议修改:无。
  2. 代码功能:修复了一个问题,当 Popover 组件进行延迟隐藏时,增加了检查是否存在该组件的判断,防止组件已销毁但依然被访问的情况。

@codecov
Copy link
Copy Markdown

codecov Bot commented May 30, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01 ⚠️

Comparison is base (20e3b5b) 57.72% compared to head (0cb6734) 57.72%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2764      +/-   ##
==========================================
- Coverage   57.72%   57.72%   -0.01%     
==========================================
  Files        1327     1327              
  Lines       83582    83583       +1     
  Branches    17379    17379              
==========================================
  Hits        48246    48246              
- Misses      32115    32116       +1     
  Partials     3221     3221              
Flag Coverage Δ
jsdom 52.72% <ø> (-0.01%) ⬇️
node 16.79% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@winjo winjo merged commit 834cb8e into main May 30, 2023
@winjo winjo deleted the fix/popover-hide branch May 30, 2023 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants