remove object.fromEntries (#933)

This commit is contained in:
David Luzar 2020-03-13 15:10:24 +01:00 committed by GitHub
parent f393486eed
commit 450a024f5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 10 deletions

View file

@ -7,9 +7,10 @@ export const actionSelectAll = register({
return {
appState: {
...appState,
selectedElementIds: Object.fromEntries(
elements.map(element => [element.id, true]),
),
selectedElementIds: elements.reduce((map, element) => {
map[element.id] = true;
return map;
}, {} as any),
},
};
},