File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed 
packages/compass-data-modeling/src/utils Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ export function isSameFieldOrAncestor(
1414  if  ( ancestor . length  ===  child . length ) 
1515    return  areFieldPathsEqual ( ancestor ,  child ) ; 
1616  if  ( ancestor . length  >  child . length )  return  false ; 
17-   const  pathAncestor  =  JSON . stringify ( ancestor ) ; 
18-   const  pathChild  =  JSON . stringify ( child ) ; 
1917  // ignore the last character - closing bracket 
20-   return  ( 
21-     pathAncestor . slice ( 0 ,  pathAncestor . length  -  1 )  === 
22-     pathChild . slice ( 0 ,  pathAncestor . length  -  1 ) 
18+   const  ancestorPath  =  JSON . stringify ( ancestor ) . slice ( 0 ,  - 1 ) ; 
19+   const  beginningOfchildPath  =  JSON . stringify ( child ) . slice ( 
20+     0 , 
21+     ancestorPath . length 
2322  ) ; 
23+   return  ancestorPath  ===  beginningOfchildPath ; 
2424} 
2525
2626export  function  isRelationshipOfAField ( 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments