We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a247146 commit 667e145Copy full SHA for 667e145
1 file changed
packages/server/src/Hocuspocus.ts
@@ -380,10 +380,10 @@ export class Hocuspocus<Context = any> {
380
await this.hooks(
381
"onLoadDocument",
382
hookPayload,
383
- (loadedDocument: Doc | Uint8Array | undefined) => {
+ (loadedDocument: Doc | Uint8ArrayConstructor | undefined) => {
384
if (loadedDocument instanceof Doc) {
385
applyUpdate(document, encodeStateAsUpdate(loadedDocument));
386
- } else if (Array.isArray(loadedDocument)) {
+ } else if (loadedDocument instanceof Uint8Array) {
387
applyUpdate(document, loadedDocument);
388
}
389
},
0 commit comments