Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
fix: replace reference with fn call
Browse files Browse the repository at this point in the history
  • Loading branch information
matchai committed May 3, 2021
1 parent 19d1723 commit 09cdb12
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/TreeReplica.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@ export class TreeReplica<Id, Metadata> {
latestTimeByReplica: Map<Id, Clock<Id>> = new Map();
/** A tree structure that represents the current state of the tree */
tree = this.state.tree;
/** Get a node by its id */
get = this.tree.get;

constructor(authorId: Id) {
this.time = new Clock(authorId);
}

/** Get a node by its id */
get(id: Id) {
this.tree.get(id);
}

/**
* Generates an OpMove
* Note that `this.time` is not updated until `applyOp` is called.
Expand Down

0 comments on commit 09cdb12

Please sign in to comment.