mirror of
				https://github.com/zulip/zulip-desktop.git
				synced 2025-11-04 05:53:21 +00:00 
			
		
		
		
	xo: Enable @typescript-eslint/restrict-template-expressions.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
		
				
					committed by
					
						
						Anders Kaseorg
					
				
			
			
				
	
			
			
			
						parent
						
							fc6ff83485
						
					
				
				
					commit
					849df4adaf
				
			@@ -45,6 +45,16 @@ export function getConfigItem(key: string, defaultValue: any = null): any {
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function getConfigString(key: string, defaultValue: string): string {
 | 
			
		||||
	const value = getConfigItem(key, defaultValue);
 | 
			
		||||
	if (typeof value === 'string') {
 | 
			
		||||
		return value;
 | 
			
		||||
	} else {
 | 
			
		||||
		setConfigItem(key, defaultValue);
 | 
			
		||||
		return defaultValue;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// This function returns whether a key exists in the configuration file (settings.json)
 | 
			
		||||
export function isConfigItemExists(key: string): boolean {
 | 
			
		||||
	try {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user