mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 03:29:59 +08:00
fix: default
This commit is contained in:
parent
60eca31754
commit
2f273546f4
@ -122,9 +122,13 @@ export default class Layout extends React.Component {
|
||||
}
|
||||
|
||||
setTheme = theme => {
|
||||
const componentPage = /^\/?components/.test(this.props.location.pathname);
|
||||
if (typeof window === 'undefined') {
|
||||
return;
|
||||
}
|
||||
if (!componentPage) {
|
||||
return 'default';
|
||||
}
|
||||
if (theme !== 'dark') {
|
||||
const dom = document.getElementById('theme-style');
|
||||
if (dom) {
|
||||
|
Loading…
Reference in New Issue
Block a user