mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
perf: getEnvironment() -> env (#2636)
This commit is contained in:
4
packages/env/src/api.ts
vendored
4
packages/env/src/api.ts
vendored
@@ -1,8 +1,8 @@
|
||||
import { config, getEnvironment } from './config';
|
||||
import { config, env } from './config';
|
||||
import { isValidIPAddress } from './is-valid-ip-address';
|
||||
|
||||
let prefixUrl = '/';
|
||||
if (typeof window === 'undefined' || getEnvironment().isDesktop) {
|
||||
if (typeof window === 'undefined' || env.isDesktop) {
|
||||
// SSR or Desktop
|
||||
const serverAPI = config.serverAPI;
|
||||
if (isValidIPAddress(serverAPI.split(':')[0])) {
|
||||
|
||||
Reference in New Issue
Block a user