mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
docs: 处理移动端HTML报错 (#5536)
This commit is contained in:
parent
925239b543
commit
67f839d18b
@ -75,7 +75,13 @@
|
||||
if (theme == 'default') {
|
||||
theme = 'cxd';
|
||||
}
|
||||
document.querySelector(`link[title=${theme}]`).disabled = false;
|
||||
|
||||
const linkDom = document.querySelector(`link[title=${theme}]`);
|
||||
|
||||
if (linkDom) {
|
||||
linkDom.disabled = false;
|
||||
}
|
||||
|
||||
if (theme === 'dark') {
|
||||
document.querySelector('body').classList.add('dark');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user