diff --git a/packages/charts/react-charting/src/components/DeclarativeChart/DeclarativeChart.tsx b/packages/charts/react-charting/src/components/DeclarativeChart/DeclarativeChart.tsx index 7c27bfc94b9112..ee2f9f254ff4a4 100644 --- a/packages/charts/react-charting/src/components/DeclarativeChart/DeclarativeChart.tsx +++ b/packages/charts/react-charting/src/components/DeclarativeChart/DeclarativeChart.tsx @@ -29,7 +29,7 @@ import { useTheme } from '@fluentui/react'; export const UseIsDarkTheme = (): boolean => { const theme = useTheme(); - return theme.isInverted; + return theme?.isInverted ?? false; }; export interface Schema {