From 26bd3533d83e4f5773b1b31ffb746fa4a430926a Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Sat, 20 Jan 2024 03:27:18 +0530 Subject: [PATCH] Stop rendering empty starter questions element when no questions present --- src/interface/desktop/chat.html | 2 +- src/khoj/interface/web/chat.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interface/desktop/chat.html b/src/interface/desktop/chat.html index 9fe4d14b..6a25497d 100644 --- a/src/interface/desktop/chat.html +++ b/src/interface/desktop/chat.html @@ -599,7 +599,7 @@ .then(response => response.json()) .then(data => { // Render chat options, if any - if (data) { + if (data.length > 0) { let questionStarterSuggestions = document.getElementById("question-starters"); for (let index in data) { let questionStarter = data[index]; diff --git a/src/khoj/interface/web/chat.html b/src/khoj/interface/web/chat.html index f371e00b..b8571d8e 100644 --- a/src/khoj/interface/web/chat.html +++ b/src/khoj/interface/web/chat.html @@ -581,7 +581,7 @@ To get started, just start typing below. You can also type / to see a list of co .then(response => response.json()) .then(data => { // Render chat options, if any - if (data) { + if (data.length > 0) { let questionStarterSuggestions = document.getElementById("question-starters"); for (let index in data) { let questionStarter = data[index];