docs: fix localstorage theme

This commit is contained in:
MadCcc 2022-11-22 21:12:00 +08:00
parent bc252da0ad
commit 9e7dc4dd4c

View File

@ -68,6 +68,8 @@ const GlobalLayout: FC = () => {
const themeConfig = JSON.parse(localTheme);
if (themeConfig.algorithm) {
themeConfig.algorithm = themeConfig.algorithm.map((item: string) => getAlgorithm(item));
} else {
themeConfig.algorithm = [antdTheme.defaultAlgorithm];
}
setTheme(themeConfig);
} catch (e) {