remove redundant map

This commit is contained in:
Jorge Vergara 2022-06-12 18:58:28 -04:00
commit 28f04fd881

View file

@ -145,9 +145,7 @@
const dispatch = createEventDispatcher();
const batchSelectedIds = writable(false);
const tableRows = writable(rows);
$: thKeys = headers
.map(({ key }) => ({ key, id: key }))
.reduce((a, c) => ({ ...a, [c.key]: c.id }), {});
$: thKeys = headers.reduce((a, c) => ({ ...a, [c.key]: c.key }), {});
const resolvePath = (object, path) => {
if (path in object) return object[path];
return path