diff --git a/superset-frontend/src/dashboard/containers/DashboardPage.tsx b/superset-frontend/src/dashboard/containers/DashboardPage.tsx index 97a4dc2283d65..49bf783ba3444 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 = ({ 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);