Skip to content

Commit

Permalink
reduce this one thing to es5
Browse files Browse the repository at this point in the history
  • Loading branch information
ahamelers committed Oct 22, 2024
1 parent 764ede1 commit 4d5a6dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/javascripts/stash_engine/group_by_polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if (!hasGroup) {
const groupBy = (arr, callback) => {
return arr.reduce((acc = {}, ...args) => {
const key = callback(...args);
acc[key] ??= []
if(!acc[key]) acc[key] = []
acc[key].push(args[0]);
return acc;
}, {});
Expand Down

0 comments on commit 4d5a6dc

Please sign in to comment.