mirror of
				https://github.com/zulip/zulip-desktop.git
				synced 2025-11-03 21:43:18 +00:00 
			
		
		
		
	config-util: Change return to a single return statement in isConfigItemExists.
Also add comments to describe the isConfigItemExists function.
This commit is contained in:
		
				
					committed by
					
						
						Akash Nimare
					
				
			
			
				
	
			
			
			
						parent
						
							c742591471
						
					
				
				
					commit
					22d6c6a2f3
				
			@@ -48,15 +48,11 @@ class ConfigUtil {
 | 
			
		||||
			return value;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// This function returns whether a key exists in the configuration file (settings.json)
 | 
			
		||||
	isConfigItemExists(key) {
 | 
			
		||||
		this.reloadDB();
 | 
			
		||||
		const value = this.db.getData('/')[key];
 | 
			
		||||
		if (value === undefined) {
 | 
			
		||||
			return false;
 | 
			
		||||
		} else {
 | 
			
		||||
			return true;
 | 
			
		||||
		}
 | 
			
		||||
		return (value !== undefined);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	setConfigItem(key, value) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user