fix(electron): window only ui (#2926)

This commit is contained in:
Alex Yang
2023-06-30 00:15:44 +08:00
parent 03dea53b30
commit bfbb7e9e6b
5 changed files with 42 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
import { migrateToSubdoc } from '@affine/env/blocksuite';
import { setupGlobal } from '@affine/env/global';
import { platformSchema, setupGlobal } from '@affine/env/global';
import type {
LocalIndexedDBDownloadProvider,
WorkspaceAdapter,
@@ -39,6 +39,13 @@ if (!environment.isServer) {
import('@affine/bookmark-block');
}
// platform check
{
if (globalThis.platform) {
platformSchema.parse(globalThis.platform);
}
}
if (!environment.isDesktop && !environment.isServer) {
// Polyfill Electron
const unimplemented = () => {