mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	eslint: Replace empty-returns with consistent-return.
Instead of prohibiting ‘return undefined’ (#8669), we require that a function must return an explicit value always or never. This prevents you from forgetting to return a value in some cases. It will also be important for TypeScript, which distinguishes between undefined and void. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							fe66aef0ad
						
					
				
				
					commit
					d72423ef21
				
			@@ -105,7 +105,6 @@ exports.initialize = function () {
 | 
			
		||||
        on_move() {
 | 
			
		||||
            if (page_params.search_pills_enabled) {
 | 
			
		||||
                ui_util.place_caret_at_end(search_query_box[0]);
 | 
			
		||||
                return true;
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
        // Use our custom typeahead `on_escape` hook to exit
 | 
			
		||||
@@ -130,7 +129,7 @@ exports.initialize = function () {
 | 
			
		||||
                // Don't submit the form so that the typeahead can instead
 | 
			
		||||
                // handle our Enter keypress. Any searching that needs
 | 
			
		||||
                // to be done will be handled in the keyup.
 | 
			
		||||
                return false;
 | 
			
		||||
                e.preventDefault();
 | 
			
		||||
            }
 | 
			
		||||
        })
 | 
			
		||||
        .on("keyup", (e) => {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user