mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	Fix: Infinite loading due to empty string in search query
This commit is contained in:
		
							parent
							
								
									b27d4b6c4a
								
							
						
					
					
						commit
						051b7b22de
					
				
					 1 changed files with 8 additions and 4 deletions
				
			
		| 
						 | 
					@ -200,10 +200,14 @@ export default {
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        submitSearch(e) {
 | 
					        submitSearch(e) {
 | 
				
			||||||
            e.target.blur();
 | 
					            e.target.blur();
 | 
				
			||||||
            this.$router.push({
 | 
					            if (this.searchText) {
 | 
				
			||||||
                name: "SearchResults",
 | 
					                this.$router.push({
 | 
				
			||||||
                query: { search_query: this.searchText },
 | 
					                    name: "SearchResults",
 | 
				
			||||||
            });
 | 
					                    query: { search_query: this.searchText },
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                this.$router.push("/");
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue