Skip to content

Commit

Permalink
fix[#75]: page going blank when searching non existing articles
Browse files Browse the repository at this point in the history
  • Loading branch information
muhdsalm authored and mirkobrombin committed Jul 12, 2024
1 parent 2c37183 commit a407de7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ export default defineComponent({
try {
// @ts-ignore
const response = await this.$chronosAPI.searchArticles(this.chronosStore.prefLang, this.search, this.collectionShortName);
this.searchResponse = response;
if (response != null) {
this.searchResponse = response;
} else {
this.searchResponse = [];
}
} catch (error) {
console.error("Error searching articles:", error);
this.searchResponse = [];
Expand Down

0 comments on commit a407de7

Please sign in to comment.