File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,11 @@ import {first, next} from '../../util/trees/util';
66import type { Printable } from '../../util/print/types' ;
77
88export class PatchLog implements Printable {
9- public static fromModel ( model : Model < any > ) : PatchLog {
9+ public static fromNewModel ( model : Model < any > ) : PatchLog {
1010 const start = new Model ( model . clock . clone ( ) ) ;
1111 const log = new PatchLog ( start ) ;
12- if ( model . api . builder . patch . ops . length ) {
13- const patch = model . api . flush ( ) ;
14- log . push ( patch ) ;
15- }
12+ const api = model . api ;
13+ if ( api . builder . patch . ops . length ) log . push ( api . flush ( ) ) ;
1614 return log ;
1715 }
1816
Original file line number Diff line number Diff line change 11import { Patch } from "../../json-crdt-patch" ;
2- import { PatchLog } from "../file /PatchLog" ;
2+ import { PatchLog } from "../history /PatchLog" ;
33import { Model } from "../model" ;
44
55/**
You can’t perform that action at this time.
0 commit comments