openedx / frontend-app-discussions

A React-based micro frontend for the Open edX discussion forums.
GNU Affero General Public License v3.0
6 stars 62 forks source link

fix: fixed leak issue when checkpoint will be undefined #553

Closed sundasnoreen12 closed 1 year ago

sundasnoreen12 commented 1 year ago

INF-987

Description

Fixed memory leak issue due to infinite times call of useeffect after adding new tour type in the "AVAILABLE_DISCUSSION_TOURS" in internals because of undefined checkpoints for newly added notification tour type which is for frontend-component-header-edx instead of discussion MFE.

Post-merge Checklist

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (b8f11c3) 92.30% compared to head (fd35988) 92.30%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #553 +/- ## ======================================= Coverage 92.30% 92.30% ======================================= Files 170 170 Lines 3471 3471 Branches 904 906 +2 ======================================= Hits 3204 3204 Misses 246 246 Partials 21 21 ``` | [Files Changed](https://app.codecov.io/gh/openedx/frontend-app-discussions/pull/553?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openedx) | Coverage Ξ” | | |---|---|---| | [src/discussions/data/hooks.js](https://app.codecov.io/gh/openedx/frontend-app-discussions/pull/553?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openedx#diff-c3JjL2Rpc2N1c3Npb25zL2RhdGEvaG9va3MuanM=) | `87.17% <100.00%> (ΓΈ)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.