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 CHANGED
@@ -56,6 +56,7 @@ this license.
56
56
  The precise terms and conditions for copying, distribution and
57
57
  modification follow.
58
58
 
59
+
59
60
  TERMS AND CONDITIONS
60
61
 
61
62
  0. Definitions.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-drive",
3
- "version": "1.0.0-alpha.41",
3
+ "version": "1.0.0-alpha.43",
4
4
  "license": "AGPL-3.0-only",
5
5
  "type": "module",
6
6
  "module": "./src/index.ts",
@@ -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.pop();
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
- await this.cache.setDocument(drive, id, document);
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
- await this.cache.setDocument("drives", drive, document);
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
  }