fix: missing await for an async function call (#4035)
							parent
							
								
									7994d664fd
								
							
						
					
					
						commit
						e29352d0f1
					
				|  | @ -6,8 +6,8 @@ export function useRefresh() { | ||||||
|   const router = useRouter(); |   const router = useRouter(); | ||||||
|   const tabbarStore = useTabbarStore(); |   const tabbarStore = useTabbarStore(); | ||||||
| 
 | 
 | ||||||
|   function refresh() { |   async function refresh() { | ||||||
|     tabbarStore.refresh(router); |     await tabbarStore.refresh(router); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   return { |   return { | ||||||
|  |  | ||||||
|  | @ -44,7 +44,7 @@ export function useTabs() { | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   async function openTabInNewWindow(tab?: RouteLocationNormalized) { |   async function openTabInNewWindow(tab?: RouteLocationNormalized) { | ||||||
|     tabbarStore.openTabInNewWindow(tab || route); |     await tabbarStore.openTabInNewWindow(tab || route); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   async function closeTabByKey(key: string) { |   async function closeTabByKey(key: string) { | ||||||
|  |  | ||||||
|  | @ -48,18 +48,18 @@ export function useWatermark() { | ||||||
|     }; |     }; | ||||||
|     watermark.value = new Watermark(cachedOptions.value); |     watermark.value = new Watermark(cachedOptions.value); | ||||||
| 
 | 
 | ||||||
|     watermark.value?.create(); |     await watermark.value?.create(); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   async function updateWatermark(options: Partial<WatermarkOptions>) { |   async function updateWatermark(options: Partial<WatermarkOptions>) { | ||||||
|     if (!watermark.value || !watermark.value?.check()) { |     if (watermark.value) { | ||||||
|       await initWatermark(options); |  | ||||||
|     } else { |  | ||||||
|       await nextTick(); |       await nextTick(); | ||||||
|       watermark.value?.changeOptions({ |       await watermark.value?.changeOptions({ | ||||||
|         ...cachedOptions.value, |         ...cachedOptions.value, | ||||||
|         ...options, |         ...options, | ||||||
|       }); |       }); | ||||||
|  |     } else { | ||||||
|  |       await initWatermark(options); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -349,7 +349,7 @@ export const useTabbarStore = defineStore('core-tabbar', { | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     async setUpdateTime() { |     setUpdateTime() { | ||||||
|       this.updateTime = Date.now(); |       this.updateTime = Date.now(); | ||||||
|     }, |     }, | ||||||
|     /** |     /** | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Li Kui
						Li Kui