fix: deepscan issues

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

No files matched your search

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