Skip to content

Commit f31df63

Browse files
committed
Shorter == better 😎
1 parent f77d7f8 commit f31df63

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

components/dashboard/src/insights/download/download-sessions.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,7 @@ const downloadUsageCSV = async ({
101101
};
102102
}
103103

104-
const rows = records
105-
.map((record) => {
106-
return transformSessionRecord(record);
107-
})
108-
.filter((r) => !!r);
104+
const rows = records.map(transformSessionRecord).filter((r) => !!r);
109105
const fields = Object.keys(rows[0]) as (keyof ReturnType<typeof transformSessionRecord>)[];
110106

111107
// TODO: look into a lib to handle this more robustly

0 commit comments

Comments
 (0)