mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
fix(editor): remove ts ignore (#9567)
This commit is contained in:
@@ -10,28 +10,21 @@ export * from './transformer';
|
||||
export { type IdGenerator, nanoid, uuidv4 } from './utils/id-generator';
|
||||
export * from './yjs';
|
||||
|
||||
const env =
|
||||
const env = (
|
||||
typeof globalThis !== 'undefined'
|
||||
? globalThis
|
||||
: typeof window !== 'undefined'
|
||||
? window
|
||||
: // oxlint-disable-next-line
|
||||
// @ts-ignore FIXME: typecheck error
|
||||
typeof global !== 'undefined'
|
||||
? // oxlint-disable-next-line
|
||||
// @ts-ignore FIXME: typecheck error
|
||||
global
|
||||
: {};
|
||||
: typeof global !== 'undefined'
|
||||
? global
|
||||
: {}
|
||||
) as Record<string, boolean>;
|
||||
const importIdentifier = '__ $BLOCKSUITE_STORE$ __';
|
||||
|
||||
// oxlint-disable-next-line
|
||||
// @ts-ignore FIXME: typecheck error
|
||||
if (env[importIdentifier] === true) {
|
||||
// https://github.com/yjs/yjs/issues/438
|
||||
console.error(
|
||||
'@blocksuite/store was already imported. This breaks constructor checks and will lead to issues!'
|
||||
);
|
||||
}
|
||||
// oxlint-disable-next-line
|
||||
// @ts-ignore FIXME: typecheck error
|
||||
env[importIdentifier] = true;
|
||||
|
||||
Reference in New Issue
Block a user