summaryrefslogtreecommitdiff
path: root/html/repo_query.js
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-01-26 11:38:21 +0100
committerWojtek Kosior <koszko@koszko.org>2022-01-26 11:38:21 +0100
commit42fe44050661ed59198fb166672bfdaa119d4333 (patch)
tree35060fc1afdd85aa0c450708e8983a4ec88182b5 /html/repo_query.js
parentb75a5717a084c9e5a727c2e960f2b910abcb5ace (diff)
downloadbrowser-extension-42fe44050661ed59198fb166672bfdaa119d4333.tar.gz
browser-extension-42fe44050661ed59198fb166672bfdaa119d4333.zip
add new extension's popup page
Diffstat (limited to 'html/repo_query.js')
-rw-r--r--html/repo_query.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/html/repo_query.js b/html/repo_query.js
index 8f33356..a4b8890 100644
--- a/html/repo_query.js
+++ b/html/repo_query.js
@@ -118,16 +118,17 @@ function RepoEntry(query_view, repo_url) {
return;
}
- this.info_span.remove();
- this.results_list.classList.remove("hide");
-
this.result_entries = results.map(ref => new ResultEntry(this, ref));
- const to_append = this.result_entries.length > 0 ?
- this.result_entries.map(re => re.main_li) :
- ["No results :("];
+ if (this.result_entries.length > 0) {
+ this.results_list.classList.remove("hide");
+ this.info_span.remove();
- this.results_list.append(...to_append);
+ const to_append = this.result_entries.map(re => re.main_li);
+ this.results_list.append(...to_append);
+ } else {
+ this.info_span.innerText = "No results :(";
+ }
}
let show_results = () => {