fix: deepscan issues

This commit is contained in:
linonetwo
2023-02-10 17:33:47 +08:00
parent ed1a917dc1
commit 6296cb0910
2 changed files with 8 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
import { BlobSyncState } from '@blocksuite/store'; import { BlobSyncState } from '@blocksuite/store';
import * as ipcMethods from '../ipc/methods.js'; import * as ipcMethods from '../ipc/methods.js';
import { BlobOptionsGetter, Signal } from '@blocksuite/store'; import { Signal } from '@blocksuite/store';
import type { import type {
BlobProvider, BlobProvider,
BlobSyncStateChangeEvent, BlobSyncStateChangeEvent,
@@ -41,12 +41,10 @@ export class IPCBlobProvider implements BlobProvider {
}); });
// Make a Blob from the bytes // Make a Blob from the bytes
const blob = new Blob([new Uint8Array(blobArray)], { type: 'image/bmp' }); const blob = new Blob([new Uint8Array(blobArray)], { type: 'image/bmp' });
if (blob) { this.signals.onBlobSyncStateChange.emit({
this.signals.onBlobSyncStateChange.emit({ id,
id, state: BlobSyncState.Success,
state: BlobSyncState.Success, });
});
}
return window.URL.createObjectURL(blob); return window.URL.createObjectURL(blob);
} }

View File

@@ -163,6 +163,9 @@ export class TauriIPCProvider extends LocalProvider {
update: Array.from(update), update: Array.from(update),
id, id,
}); });
if (!success) {
throw new Error(`YDoc update failed, id: ${id}`);
}
} }
return workspaceUnit; return workspaceUnit;
} }