File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -102,14 +102,15 @@ export const compareDocuments = async (
102102  let  prevDocData  =  prevFile  &&  JSON . parse ( await  prevFile . text ( ) ) 
103103  let  currDocData  =  currFile  &&  JSON . parse ( await  currFile . text ( ) ) 
104104
105+   // create a copy of the document with only the operations belonging to the prefix group if there are prefix groups 
105106  if  ( prevDocData  &&  previousGroup )  { 
106107    prevDocData  =  createCopyWithPrefixGroupOperationsOnly ( prevDocData ,  previousGroup ) 
107108  } 
108- 
109109  if  ( currDocData  &&  currentGroup )  { 
110110    currDocData  =  createCopyWithPrefixGroupOperationsOnly ( currDocData ,  currentGroup ) 
111111  } 
112112
113+   // create an empty counterpart of the document for the case when one of the documents is empty 
113114  if  ( ! prevDocData  &&  currDocData )  { 
114115    prevDocData  =  createCopyWithEmptyPathItems ( currDocData ) 
115116  } 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments