Skip to content

Commit 8e74e1b

Browse files
committed
fix: lint
1 parent bfe20fd commit 8e74e1b

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

src/pages/home/report/ReportActionItemParentAction.tsx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,13 @@ function ReportActionItemParentAction({
8787
canBeMissing: true,
8888
selector: (allPairs) => {
8989
const ancestorIDsToSelect = new Set(allAncestors.map(({report: reportAncestor}) => reportAncestor.reportID));
90-
91-
return Object.entries(allPairs ?? {}).reduce(
92-
(acc, [key, value]) => {
93-
const id = key.split('_').at(1);
94-
if (ancestorIDsToSelect.has(id ?? '')) {
95-
acc[key] = value;
96-
}
97-
return acc;
98-
},
99-
{} as Record<string, unknown>,
100-
);
90+
return Object.entries(allPairs ?? {}).reduce((acc, [key, value]) => {
91+
const id = key.split('_').at(1);
92+
if (ancestorIDsToSelect.has(id ?? '') && acc) {
93+
acc[key] = value;
94+
}
95+
return acc;
96+
}, {} as OnyxCollection<OnyxTypes.ReportNameValuePairs>);
10197
},
10298
});
10399

0 commit comments

Comments
 (0)