docs: fix site check where logic

This commit is contained in:
二货机器人 2022-12-05 18:30:02 +08:00
parent 8296b72585
commit c09dab5850

View File

@ -35,15 +35,15 @@ export default function InfoNewVersion() {
updateCSS(
`
:where(.${whereCls}) {
width: 93px !important;
content: "__CHECK__";
}
`,
whereCls,
);
// Check style
const { width } = getComputedStyle(p);
setSupportWhere(String(width) === '93px');
const { content } = getComputedStyle(p);
setSupportWhere(String(content).includes('CHECK'));
return () => {
document.body.removeChild(p);