mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-19 15:26:59 +08:00
fix: types; empty check
This commit is contained in:
@@ -63,7 +63,7 @@ export class AffineProvider extends BaseProvider {
|
|||||||
assert(room);
|
assert(room);
|
||||||
this.linkLocal(workspace);
|
this.linkLocal(workspace);
|
||||||
const updates = await this._apis.downloadWorkspace(room);
|
const updates = await this._apis.downloadWorkspace(room);
|
||||||
if (updates) {
|
if (updates && updates.byteLength) {
|
||||||
await new Promise(resolve => {
|
await new Promise(resolve => {
|
||||||
doc.once('update', resolve);
|
doc.once('update', resolve);
|
||||||
applyUpdate(doc, new Uint8Array(updates));
|
applyUpdate(doc, new Uint8Array(updates));
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import * as workspace from './workspace.js';
|
|||||||
import { token } from './token.js';
|
import { token } from './token.js';
|
||||||
|
|
||||||
export type Apis = typeof user &
|
export type Apis = typeof user &
|
||||||
typeof workspace & {
|
Omit<typeof workspace, 'WorkspaceType' | 'PermissionType'> & {
|
||||||
signInWithGoogle: ReturnType<typeof getAuthorizer>[0];
|
signInWithGoogle: ReturnType<typeof getAuthorizer>[0];
|
||||||
onAuthStateChanged: ReturnType<typeof getAuthorizer>[1];
|
onAuthStateChanged: ReturnType<typeof getAuthorizer>[1];
|
||||||
} & { token: typeof token };
|
} & { token: typeof token };
|
||||||
|
|||||||
Reference in New Issue
Block a user