mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-21 23:23:21 +03:00
fixed bug where search results showed old results when search bar was empty
This commit is contained in:
@@ -402,7 +402,7 @@ export class MainComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inputChanged(new_val) {
|
inputChanged(new_val) {
|
||||||
if (new_val === '') {
|
if (new_val === '' || !new_val) {
|
||||||
this.results_showing = false;
|
this.results_showing = false;
|
||||||
} else {
|
} else {
|
||||||
if (this.ValidURL(new_val)) {
|
if (this.ValidURL(new_val)) {
|
||||||
@@ -465,7 +465,7 @@ export class MainComponent implements OnInit {
|
|||||||
.subscribe(
|
.subscribe(
|
||||||
(results: Result[]) => {
|
(results: Result[]) => {
|
||||||
this.results_loading = false;
|
this.results_loading = false;
|
||||||
if (results && results.length > 0) {
|
if (this.url !== '' && results && results.length > 0) {
|
||||||
this.results = results;
|
this.results = results;
|
||||||
this.results_showing = true;
|
this.results_showing = true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user