Skip to content

Commit

Permalink
fix: flatMap polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
pablo1v committed Feb 21, 2021
1 parent 3c02b91 commit 5f20a23
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion shared/getWorkspacesPackages.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ function getWorkspacesPackages(getRoot = true) {
workspacesArray.push(...workspaces.packages);
}

return [root, ...workspacesArray.flatMap(getPackages)].filter(Boolean);
const packages = workspacesArray
.map(getPackages)
.reduce((array, value) => array.concat(value), []);

return [root, ...packages].filter(Boolean);
}

/**
Expand Down

0 comments on commit 5f20a23

Please sign in to comment.