Fix defaults
This commit is contained in:
		
							parent
							
								
									1518a4e5c8
								
							
						
					
					
						commit
						20477c0102
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -8,9 +8,8 @@ function getBangredirectUrl() {
 | 
			
		|||
  if (!query) return null;
 | 
			
		||||
 | 
			
		||||
  const match = query.match(/!([a-z]+)/i);
 | 
			
		||||
  if (!match) return null;
 | 
			
		||||
 | 
			
		||||
  const bangCandidate = match[1].toLowerCase();
 | 
			
		||||
  const bangCandidate = match?.[1]?.toLowerCase();
 | 
			
		||||
  const selectedBang = bangs.find((b) => b.t === bangCandidate) ?? defaultBang;
 | 
			
		||||
 | 
			
		||||
  // Remove the first bang from the query
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue