From a7e16de43a72ef828febf65235834ab7c14d0c1f Mon Sep 17 00:00:00 2001 From: Ayush Thakur <100013900+ayusht2810@users.noreply.github.com> Date: Sat, 13 Jul 2024 15:18:30 +0530 Subject: [PATCH] [MM-350] Fix issue in create issue modal and attach issue modal (#761) Co-authored-by: raghavaggarwal2308 --- server/plugin/api.go | 1 + webapp/src/actions/index.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/server/plugin/api.go b/server/plugin/api.go index 5f69b6b52..8dffebdd9 100644 --- a/server/plugin/api.go +++ b/server/plugin/api.go @@ -806,6 +806,7 @@ func (p *Plugin) searchIssues(c *UserContext, w http.ResponseWriter, r *http.Req result, _, err := githubClient.Search.Issues(c.Ctx, query, &github.SearchOptions{}) if err != nil { c.Log.WithError(err).With(logger.LogContext{"query": query}).Warnf("Failed to search for issues") + p.writeJSON(w, make([]*github.Issue, 0)) return } diff --git a/webapp/src/actions/index.ts b/webapp/src/actions/index.ts index f4cc7aea3..af1f7ee22 100644 --- a/webapp/src/actions/index.ts +++ b/webapp/src/actions/index.ts @@ -76,6 +76,10 @@ export function getRepos() { try { data = await Client.getRepositories(); } catch (error) { + dispatch({ + type: ActionTypes.RECEIVED_REPOSITORIES, + data: [], + }); return {error: data}; }