mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 21:19:37 +08:00
docs: fix localstorage theme
This commit is contained in:
parent
bc252da0ad
commit
9e7dc4dd4c
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user