mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-06 08:50:50 +08:00
fix(env): is mobile flag (#8005)
only 'mobile' entry has isMobile = true flag
This commit is contained in:
@@ -31,7 +31,7 @@ import type { PropsWithChildren, ReactElement } from 'react';
|
||||
import { lazy, Suspense } from 'react';
|
||||
import { RouterProvider } from 'react-router-dom';
|
||||
|
||||
if (!environment.isBrowser && environment.isDebug) {
|
||||
if (environment.isElectron && environment.isDebug) {
|
||||
document.body.innerHTML = `<h1 style="color:red;font-size:5rem;text-align:center;">Don't run web entry in electron.</h1>`;
|
||||
throw new Error('Wrong distribution');
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import '@affine/core/bootstrap/preload';
|
||||
|
||||
import { performanceLogger } from '@affine/core/shared';
|
||||
import { appInfo } from '@affine/electron-api';
|
||||
import { isDesktop } from '@affine/env/constant';
|
||||
import {
|
||||
init,
|
||||
reactRouterV6BrowserTracingIntegration,
|
||||
@@ -28,7 +27,7 @@ function main() {
|
||||
performanceMainLogger.info('start');
|
||||
|
||||
// skip bootstrap setup for desktop onboarding
|
||||
if (isDesktop && appInfo?.windowName === 'onboarding') {
|
||||
if (environment.isElectron && appInfo?.windowName === 'onboarding') {
|
||||
performanceMainLogger.info('skip setup');
|
||||
} else {
|
||||
performanceMainLogger.info('setup start');
|
||||
|
||||
Reference in New Issue
Block a user