mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
fix: 修复sdk报错问题 (#8466)
Co-authored-by: qinhaoyan <30946345+qinhaoyan@users.noreply.github.com>
This commit is contained in:
parent
637d9551b7
commit
b05b7daaf9
@ -48,13 +48,13 @@ export default function (props: CustomStyleProps) {
|
||||
id,
|
||||
defaultData,
|
||||
env?.customStyleClassPrefix,
|
||||
env.getModalContainer?.().ownerDocument
|
||||
env.getModalContainer?.()?.ownerDocument
|
||||
);
|
||||
}
|
||||
|
||||
return () => {
|
||||
if (id && !styleIdCount.get(id)) {
|
||||
removeCustomStyle('', id, env.getModalContainer?.().ownerDocument);
|
||||
removeCustomStyle('', id, env.getModalContainer?.()?.ownerDocument);
|
||||
}
|
||||
};
|
||||
}, [themeCss, id]);
|
||||
@ -64,7 +64,7 @@ export default function (props: CustomStyleProps) {
|
||||
insertEditCustomStyle(
|
||||
wrapperCustomStyle,
|
||||
id,
|
||||
env.getModalContainer?.().ownerDocument
|
||||
env.getModalContainer?.()?.ownerDocument
|
||||
);
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ export default function (props: CustomStyleProps) {
|
||||
removeCustomStyle(
|
||||
'wrapperCustomStyle',
|
||||
id,
|
||||
env.getModalContainer?.().ownerDocument
|
||||
env.getModalContainer?.()?.ownerDocument
|
||||
);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user