Skip to content

Commit

Permalink
simplify filepath
Browse files Browse the repository at this point in the history
  • Loading branch information
benpankow committed Apr 29, 2024
1 parent 0f120fd commit e8f95dc
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ export const CodeLink = ({codeLinkData}: {codeLinkData: CodeLinkData}) => {
const codeSourceDataByKey =
codeLinkData &&
Object.entries(codeLinkData).reduce(
(
acc: {[key: string]: {file: string; lineNumber: any}},
[key, [pathToModule, pathFromModule, lineNumber]],
) => {
acc[key] = {file: `${pathToModule}/${pathFromModule}`, lineNumber};
(acc: {[key: string]: {file: string; lineNumber: any}}, [key, [file, lineNumber]]) => {
acc[key] = {file, lineNumber};
return acc;
},
{},
Expand Down

0 comments on commit e8f95dc

Please sign in to comment.