@fluidframework/map 2.0.0-internal.7.0.0 → 2.0.0-internal.7.0.1

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.
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/map";
8
- export declare const pkgVersion = "2.0.0-internal.7.0.0";
8
+ export declare const pkgVersion = "2.0.0-internal.7.0.1";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluidframework/map";
11
- exports.pkgVersion = "2.0.0-internal.7.0.0";
11
+ exports.pkgVersion = "2.0.0-internal.7.0.1";
12
12
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,qBAAqB,CAAC;AAChC,QAAA,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/map\";\nexport const pkgVersion = \"2.0.0-internal.7.0.0\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,qBAAqB,CAAC;AAChC,QAAA,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/map\";\nexport const pkgVersion = \"2.0.0-internal.7.0.1\";\n"]}
package/lib/directory.js CHANGED
@@ -1250,9 +1250,12 @@ class SubDirectory extends TypedEventEmitter {
1250
1250
  const pendingMessageIds = this.pendingKeys.get(op.key);
1251
1251
  // Only submit the op, if we have record for it, otherwise it is possible that the older instance
1252
1252
  // is already deleted, in which case we don't need to submit the op.
1253
- if (pendingMessageIds !== undefined &&
1254
- pendingMessageIds[0] === localOpMetadata.pendingMessageId) {
1255
- pendingMessageIds.shift();
1253
+ if (pendingMessageIds !== undefined) {
1254
+ const index = pendingMessageIds.findIndex((id) => id === localOpMetadata.pendingMessageId);
1255
+ if (index === -1) {
1256
+ return;
1257
+ }
1258
+ pendingMessageIds.splice(index, 1);
1256
1259
  if (pendingMessageIds.length === 0) {
1257
1260
  this.pendingKeys.delete(op.key);
1258
1261
  }
@@ -1494,17 +1497,15 @@ class SubDirectory extends TypedEventEmitter {
1494
1497
  // If I have a NACK clear, we can ignore all ops.
1495
1498
  return false;
1496
1499
  }
1497
- const pendingKeyMessageId = this.pendingKeys.get(op.key);
1498
- if (pendingKeyMessageId !== undefined) {
1500
+ const pendingKeyMessageIds = this.pendingKeys.get(op.key);
1501
+ if (pendingKeyMessageIds !== undefined) {
1499
1502
  // Found an NACK op, clear it from the directory if the latest sequence number in the directory
1500
1503
  // match the message's and don't process the op.
1501
1504
  if (local) {
1502
1505
  assert(localOpMetadata !== undefined && isKeyEditLocalOpMetadata(localOpMetadata), 0x011 /* pendingMessageId is missing from the local client's operation */);
1503
- const pendingMessageIds = this.pendingKeys.get(op.key);
1504
- assert(pendingMessageIds !== undefined &&
1505
- pendingMessageIds[0] === localOpMetadata.pendingMessageId, 0x331 /* Unexpected pending message received */);
1506
- pendingMessageIds.shift();
1507
- if (pendingMessageIds.length === 0) {
1506
+ assert(pendingKeyMessageIds[0] === localOpMetadata.pendingMessageId, 0x331 /* Unexpected pending message received */);
1507
+ pendingKeyMessageIds.shift();
1508
+ if (pendingKeyMessageIds.length === 0) {
1508
1509
  this.pendingKeys.delete(op.key);
1509
1510
  }
1510
1511
  }