diff options
Diffstat (limited to 'src/client/util/reportManager/reportManagerUtils.ts')
-rw-r--r-- | src/client/util/reportManager/reportManagerUtils.ts | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/client/util/reportManager/reportManagerUtils.ts b/src/client/util/reportManager/reportManagerUtils.ts index 22e5eebbb..f14967e0a 100644 --- a/src/client/util/reportManager/reportManagerUtils.ts +++ b/src/client/util/reportManager/reportManagerUtils.ts @@ -63,9 +63,8 @@ export const getAllIssues = async (octokit: Octokit): Promise<any[]> => { // 200 status means success if (res.status === 200) { return res.data; - } else { - throw new Error('Error getting issues'); } + throw new Error('Error getting issues'); }; /** @@ -104,9 +103,7 @@ export const fileLinktoServerLink = (fileLink: string): string => { * @param link response from file upload * @returns server file path */ -export const getServerPath = (link: any): string => { - return link.result.accessPaths.agnostic.server as string; -}; +export const getServerPath = (link: any): string => link.result.accessPaths.agnostic.server as string; /** * Uploads media files to the server. @@ -124,6 +121,7 @@ export const uploadFilesToServer = async (mediaFiles: FileData[]): Promise<strin alert(err); } } + return undefined; }; // helper functions @@ -141,18 +139,16 @@ export const passesTagFilter = (issue: Issue, priorityFilter: string | null, bug passesPriority = issue.labels.some(label => { if (typeof label === 'string') { return label === priorityFilter; - } else { - return label.name === priorityFilter; } + return label.name === priorityFilter; }); } if (bugFilter) { passesBug = issue.labels.some(label => { if (typeof label === 'string') { return label === bugFilter; - } else { - return label.name === bugFilter; } + return label.name === bugFilter; }); } return passesPriority && passesBug; @@ -217,7 +213,8 @@ export const bugColors: { [key: string]: string[] } = { export const getLabelColors = (label: string): string[] => { if (prioritySet.has(label as Priority)) { return priorityColors[label]; - } else if (bugSet.has(label as BugType)) { + } + if (bugSet.has(label as BugType)) { return bugColors[label]; } return ['#0f73f6', '#ffffff']; |