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