fix: types; empty check

This commit is contained in:
alt0 committed 2023-01-09 20:48:50 +08:00
1 parent ee8da42c41
commit 72a39f67c0
2 files changed
+2 -2

No files matched your search

@@ -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));