Skip to content

Commit

Permalink
fix: WEB-2187 Improvements Jira Macro
Browse files Browse the repository at this point in the history
  • Loading branch information
krystiankedra authored Aug 14, 2024
2 parents 34332da + b906711 commit e705f48
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/proxy-page/dto/FieldInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,16 @@ export const formatVersion = (value: any) => {
const urlRegex = /(((https?:\/\/)|(www\.))[^\s]+)/g;
const result = versionUrl.flatMap((description) => {
const validDescription = description || '';
return validDescription.match(urlRegex) || [];
return validDescription.match(urlRegex);
});
const fixVersionsArray = versionName.map((name, index) => {
const link = result[index] || '';
return {
name: [name],
link: [link],
};
});

const fixVersionsArray = result.map((res, index) => ({
name: [versionName[index]],
link: [res],
}));
return [fixVersionsArray, 'link'] as [{ name: string[]; link: string[] }[], string];
};

Expand Down

0 comments on commit e705f48

Please sign in to comment.