|
|
@@ -43,9 +43,11 @@ export function useIssueType() {
|
|
|
const getNameByType = (source, type, arrayOfOptions) => {
|
|
|
// arrayOfOptions = [ aiOptions, manualOptions ]
|
|
|
const targetArray = arrayOfOptions[source - 1];
|
|
|
- const foundObject = targetArray.find(obj => obj.id === type);
|
|
|
- if (foundObject) return foundObject.name;
|
|
|
- else return '-'
|
|
|
+ if (targetArray) {
|
|
|
+ const foundObject = targetArray.find(obj => obj.id === type);
|
|
|
+ if (foundObject) return foundObject.name;
|
|
|
+ else return '-'
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
return {
|