@fluidframework/merge-tree 2.0.0-rc.1.0.2 → 2.0.0-rc.1.0.3

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/lib/mergeTree.mjs CHANGED
@@ -793,7 +793,12 @@ export class MergeTree {
793
793
  }
794
794
  // TODO: error checking
795
795
  getMarkerFromId(id) {
796
- return this.idToMarker.get(id);
796
+ const marker = this.idToMarker.get(id);
797
+ return marker === undefined ||
798
+ isRemoved(marker) ||
799
+ (isMoved(marker) && marker.moveDst === undefined)
800
+ ? undefined
801
+ : marker;
797
802
  }
798
803
  /**
799
804
  * Given a position specified relative to a marker id, lookup the marker