This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new a88fa8910d fix: Clean up custom css when dashboard unmounted (#19342)
a88fa8910d is described below
commit a88fa8910d8da21748f6bf9fc43b07e802a36662
Author: Smart-Codi <[email protected]>
AuthorDate: Tue Apr 5 17:20:31 2022 -0400
fix: Clean up custom css when dashboard unmounted (#19342)
* clean up custom css when dashboard unmounted
* resolve comment
---
superset-frontend/src/dashboard/containers/DashboardPage.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset-frontend/src/dashboard/containers/DashboardPage.tsx
b/superset-frontend/src/dashboard/containers/DashboardPage.tsx
index 97a4dc2283..49bf783ba3 100644
--- a/superset-frontend/src/dashboard/containers/DashboardPage.tsx
+++ b/superset-frontend/src/dashboard/containers/DashboardPage.tsx
@@ -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);