Skip to content

Commit

Permalink
fix: Clean up custom css when dashboard unmounted (#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 committed Apr 5, 2022
1 parent 634693b commit a88fa89
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,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 a88fa89

Please sign in to comment.