This repository was archived by the owner on Oct 1, 2025. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,12 @@ export function addNavGuards (rootVm) {
1919  } ) 
2020
2121  router . afterEach ( ( )  =>  { 
22-     const  {  metaInfo }  =  resume ( rootVm ) 
22+     rootVm . $nextTick ( ( )  =>  { 
23+       const  {  metaInfo }  =  resume ( rootVm ) 
2324
24-     if  ( metaInfo  &&  isFunction ( metaInfo . afterNavigation ) )  { 
25-       metaInfo . afterNavigation ( metaInfo ) 
26-     } 
25+       if  ( metaInfo  &&  isFunction ( metaInfo . afterNavigation ) )  { 
26+         metaInfo . afterNavigation ( metaInfo ) 
27+       } 
28+     } ) 
2729  } ) 
2830} 
Original file line number Diff line number Diff line change @@ -271,6 +271,8 @@ describe('components', () => {
271271    expect ( wrapper . vm . $root . _vueMeta . pausing ) . toBe ( true ) 
272272
273273    guards . after ( ) 
274+     expect ( afterNavigation ) . not . toHaveBeenCalled ( ) 
275+     await  vmTick ( wrapper . vm ) 
274276    expect ( afterNavigation ) . toHaveBeenCalled ( ) 
275277  } ) 
276278
@@ -306,6 +308,8 @@ describe('components', () => {
306308    expect ( wrapper . vm . $root . _vueMeta . pausing ) . toBe ( true ) 
307309
308310    guards . after ( ) 
311+     expect ( afterNavigation ) . not . toHaveBeenCalled ( ) 
312+     await  vmTick ( wrapper . vm ) 
309313    expect ( afterNavigation ) . toHaveBeenCalled ( ) 
310314  } ) 
311315
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments