diff --git a/src/common/utils.js b/src/common/utils.js index 6a91ab00..77ca6071 100644 --- a/src/common/utils.js +++ b/src/common/utils.js @@ -217,15 +217,17 @@ const fallbackColor = (color, fallbackColor) => { ); }; -const buildSearchFilter = (repos=[], orgs=[])=>{ - let repoFilter = Array.isArray(repos) && repos.length > 0 - ? repos.map((r) => `repo%3A${encodeURIComponent(r)}`).join("+") + "+" - : ""; - let orgFilter = Array.isArray(orgs) && orgs.length > 0 - ? orgs.map((o) => `org%3A${encodeURIComponent(org)}`).join("+") + "+" - : ""; +const buildSearchFilter = (repos = [], orgs = []) => { + let repoFilter = + Array.isArray(repos) && repos.length > 0 + ? repos.map((r) => `repo%3A${encodeURIComponent(r)}`).join("+") + "+" + : ""; + let orgFilter = + Array.isArray(orgs) && orgs.length > 0 + ? orgs.map((o) => `org%3A${encodeURIComponent(o)}`).join("+") + "+" + : ""; return repoFilter + orgFilter; -} +}; /** * @typedef {import('axios').AxiosRequestConfig['data']} AxiosRequestConfigData Axios request data.