diff --git a/frontend/src/components/QuickAdd.tsx b/frontend/src/components/QuickAdd.tsx index 38a6d158..adc16865 100644 --- a/frontend/src/components/QuickAdd.tsx +++ b/frontend/src/components/QuickAdd.tsx @@ -44,8 +44,8 @@ export const QuickAdd = ({ context ); if (!didCancel && result) { - setActivities(result.time_entry_activities); - setActivity(activity ? activity : result.time_entry_activities[0]); + setActivities(result.time_entry_activities ? result.time_entry_activities : []); + setActivity(activity ? activity : Array.isArray(result.time_entry_activities) ? result.time_entry_activities[0] : null); } }; @@ -80,7 +80,6 @@ export const QuickAdd = ({ candidateIssues = [foundIssue]; //allow for valid issue id autoselection if (isNumber(search.text)) { - console.log(foundIssue) setIssue(foundIssue); } } else { @@ -105,7 +104,6 @@ export const QuickAdd = ({ ); const suggestionSelected = (selection: Issue) => { - console.log(selection) setIssue(selection); // Update input box with selected issue let element = issueInputRef.current;