fix(env): is mobile flag (#8005)

only 'mobile' entry has isMobile = true flag
This commit is contained in:
EYHN
2024-09-04 09:21:36 +00:00
parent 53886a7cd3
commit 2524491bd1
78 changed files with 169 additions and 205 deletions

View File

@@ -1,15 +1,10 @@
import { isBrowser } from '@affine/env/constant';
import createCache from '@emotion/cache';
export default function createEmotionCache() {
let insertionPoint;
if (isBrowser) {
const emotionInsertionPoint = document.querySelector<HTMLMetaElement>(
'meta[name="emotion-insertion-point"]'
);
insertionPoint = emotionInsertionPoint ?? undefined;
}
const emotionInsertionPoint = document.querySelector<HTMLMetaElement>(
'meta[name="emotion-insertion-point"]'
);
const insertionPoint = emotionInsertionPoint ?? undefined;
return createCache({ key: 'affine', insertionPoint });
}