Skip to content

Commit

Permalink
fix: add optional chaining on dark theme helper (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeVoresyah authored Feb 29, 2024
1 parent ac6c856 commit b9646af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/darkThemeHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ export const isDark = (
syntax: string,
mode: "dark" | "light" | "system"
): boolean =>
syntax.includes("dark:") &&
syntax?.includes("dark:") &&
(mode === "dark" ||
(mode === "system" && Appearance.getColorScheme() === "dark"));

0 comments on commit b9646af

Please sign in to comment.