fix: 修复sdk报错问题 (#8466)

Co-authored-by: qinhaoyan <30946345+qinhaoyan@users.noreply.github.com>
This commit is contained in:
qkiroc 2023-10-24 14:14:42 +08:00 committed by GitHub
parent 637d9551b7
commit b05b7daaf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
);
}
};