@@ -28,7 +28,7 @@ export class PatchLog implements Printable {
2828 * Model factory function that creates a new JSON CRDT model instance, which
2929 * is used as the starting point of the log. It is called every time a new
3030 * model is needed to replay the log.
31- *
31+ *
3232 * @readonly Internally this function may be updated, but externally it is
3333 * read-only.
3434 */
@@ -37,7 +37,7 @@ export class PatchLog implements Printable {
3737 /**
3838 * The end of the log, the current state of the document. It is the model
3939 * instance that is used to apply new patches to the log.
40- *
40+ *
4141 * @readonly
4242 */
4343 public readonly end : Model ;
@@ -46,7 +46,7 @@ export class PatchLog implements Printable {
4646 * The patches in the log, stored in an AVL tree for efficient replaying. The
4747 * collection of patches which are applied to the `start()` model to reach
4848 * the `end` model.
49- *
49+ *
5050 * @readonly
5151 */
5252 public readonly patches = new AvlMap < ITimestampStruct , Patch > ( compare ) ;
@@ -56,7 +56,7 @@ export class PatchLog implements Printable {
5656
5757 constructor ( start : ( ) => Model ) {
5858 this . start = start ;
59- const end = this . end = start ( ) ;
59+ const end = ( this . end = start ( ) ) ;
6060 const onPatch = ( patch : Patch ) => {
6161 const id = patch . getId ( ) ;
6262 if ( ! id ) return ;
@@ -114,7 +114,7 @@ export class PatchLog implements Printable {
114114 */
115115 public advanceTo ( ts : ITimestampStruct ) : void {
116116 const newStartPatches : Patch [ ] = [ ] ;
117- let node = first ( this . patches . root )
117+ let node = first ( this . patches . root ) ;
118118 for ( ; node && compare ( ts , node . k ) >= 0 ; node = next ( node ) ) newStartPatches . push ( node . v ) ;
119119 for ( const patch of newStartPatches ) this . patches . del ( patch . getId ( ) ! ) ;
120120 const oldStart = this . start ;
0 commit comments