File tree 1 file changed +10
-2
lines changed
src/json-crdt-extensions/quill-delta/__tests__
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,18 @@ const normalizeDelta = (delta: QuillDeltaOp[]): QuillDeltaOp[] => {
15
15
if ( typeof ( last as any ) . delete === 'number' && typeof ( curr as any ) . delete === 'number' ) {
16
16
( last as QuillDeltaOpDelete ) . delete += ( curr as QuillDeltaOpDelete ) . delete ;
17
17
toDelete . push ( i ) ;
18
- } else if ( typeof ( last as any ) . retain === 'number' && typeof ( curr as any ) . retain === 'number' && deepEqual ( ( < any > last ) . attributes , ( < any > curr ) . attributes ) ) {
18
+ } else if (
19
+ typeof ( last as any ) . retain === 'number' &&
20
+ typeof ( curr as any ) . retain === 'number' &&
21
+ deepEqual ( ( < any > last ) . attributes , ( < any > curr ) . attributes )
22
+ ) {
19
23
( last as any ) . retain += ( curr as any ) . retain ;
20
24
toDelete . push ( i ) ;
21
- } else if ( typeof ( last as any ) . insert === 'string' && typeof ( curr as any ) . insert === 'string' && deepEqual ( ( < any > last ) . attributes , ( < any > curr ) . attributes ) ) {
25
+ } else if (
26
+ typeof ( last as any ) . insert === 'string' &&
27
+ typeof ( curr as any ) . insert === 'string' &&
28
+ deepEqual ( ( < any > last ) . attributes , ( < any > curr ) . attributes )
29
+ ) {
22
30
( last as any ) . insert += ( curr as any ) . insert ;
23
31
toDelete . push ( i ) ;
24
32
} else {
You can’t perform that action at this time.
0 commit comments