fix: Clean up custom css when dashboard unmounted (#19342)

* clean up custom css when dashboard unmounted

* resolve comment
This commit is contained in:
Smart-Codi 2022-04-05 17:20:31 -04:00 committed by GitHub
parent 634693b270
commit a88fa8910d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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);