document-drive 1.0.0-alpha.41 → 1.0.0-alpha.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -0
- package/package.json +1 -1
- package/src/server/index.ts +3 -3
package/LICENSE
CHANGED
package/package.json
CHANGED
package/src/server/index.ts
CHANGED
|
@@ -356,7 +356,7 @@ export class DocumentDriveServer extends BaseDocumentDriveServer {
|
|
|
356
356
|
const documentId = node.id;
|
|
357
357
|
const document = await this.getDocument(driveId, documentId);
|
|
358
358
|
const operations = document.operations[scope as OperationScope] ?? [];
|
|
359
|
-
const lastOperation = operations.
|
|
359
|
+
const lastOperation = operations[operations.length - 1];
|
|
360
360
|
|
|
361
361
|
return {
|
|
362
362
|
syncId,
|
|
@@ -904,7 +904,7 @@ export class DocumentDriveServer extends BaseDocumentDriveServer {
|
|
|
904
904
|
}
|
|
905
905
|
|
|
906
906
|
if (document) {
|
|
907
|
-
|
|
907
|
+
this.cache.setDocument(drive, id, document).catch(logger.error);
|
|
908
908
|
} else {
|
|
909
909
|
logger.warn("Successfully applied operations but no document returned");
|
|
910
910
|
}
|
|
@@ -1078,7 +1078,7 @@ export class DocumentDriveServer extends BaseDocumentDriveServer {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
|
|
1080
1080
|
if (document) {
|
|
1081
|
-
|
|
1081
|
+
this.cache.setDocument("drives", drive, document).catch(logger.error);;
|
|
1082
1082
|
} else {
|
|
1083
1083
|
logger.warn("Successfully applied operations but no drive returned");
|
|
1084
1084
|
}
|