Skip to content

Commit

Permalink
fix(text): modify the judgment rules of dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
laixingui.lxg committed Feb 26, 2025
1 parent ec2b0f2 commit 300b61f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Text/utils/useAntdDarkAlgorithm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export const useAntdDarkAlgorithm = () => {
const currentAlgorithm = config.theme?.algorithm;

if (isArray(currentAlgorithm) && currentAlgorithm.includes(darkAlgorithm)) return true;
return currentAlgorithm === darkAlgorithm;
return !!darkAlgorithm && currentAlgorithm === darkAlgorithm;
};

0 comments on commit 300b61f

Please sign in to comment.