Skip to content

Commit

Permalink
fix: Clean up custom css when dashboard unmounted (apache#19342)
Browse files Browse the repository at this point in the history
* clean up custom css when dashboard unmounted

* resolve comment
  • Loading branch information
codemaster08240328 authored and philipher29 committed Jun 9, 2022
1 parent 673bf65 commit c99d9f3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export const DashboardPage: FC<PageProps> = ({ idOrSlug }: PageProps) => {
}, [dashboard_title]);

useEffect(() => {
if (css) {
if (typeof css === 'string') {
// returning will clean up custom css
// when dashboard unmounts or changes
return injectCustomCss(css);
Expand Down

0 comments on commit c99d9f3

Please sign in to comment.