Browse Source
			
			
			fix: crash due to chrome been undefined
			
				(cherry picked from commit 53a2073cb482fc9deef7aa0ddf45447c6971d819)
			
			
				20230320
			
			
		 
		
			
				
					
						 Jixun
					
					4 years ago
						Jixun
					
					4 years ago
					
						
							committed by
							
								 MengYX
								MengYX
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: E63F9C7303E8F604
						
					
				
			
		
		
		
	
		
			
				 1 changed files with 
1 additions and 
1 deletions
			 
			
		 
		
			
				- 
					
					
					 
					src/utils/storage/ChromeExtensionStorage.ts
				
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -4,7 +4,7 @@ declare var chrome: any; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | export default class ChromeExtensionStorage extends BaseStorage { | 
			
		
	
		
			
				
					|  |  |  |   static get works(): boolean { | 
			
		
	
		
			
				
					|  |  |  |     return Boolean(chrome?.storage?.local?.set); | 
			
		
	
		
			
				
					|  |  |  |     return typeof chrome !== 'undefined' && Boolean(chrome?.storage?.local?.set); | 
			
		
	
		
			
				
					|  |  |  |   } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |   protected async load<T>(name: string, defaultValue: T): Promise<T> { | 
			
		
	
	
		
			
				
					|  |  | 
 |