Skip to content

Commit

Permalink
Adding theme check for dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
srmukher committed Dec 12, 2024
1 parent 53dd771 commit ddecc20
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ddecc20

Please sign in to comment.