fix: wrap top-level async
This commit is contained in:
		
							parent
							
								
									eaf33fedba
								
							
						
					
					
						commit
						30f4299d1e
					
				| 
						 | 
				
			
			@ -39,8 +39,10 @@ const store = {
 | 
			
		|||
      await invoke('electron-store', 'set', key, val)
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
(async () => {
 | 
			
		||||
  await store.set('Date.now', Date.now())
 | 
			
		||||
  console.log('electron-store ->', 'Date.now:', await store.get('Date.now'))
 | 
			
		||||
  console.log('electron-store ->', 'path:', await window.bridge.ipcRenderer.invoke('electron-store', 'path'))
 | 
			
		||||
})();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue