Skip to content

Commit

Permalink
chore(build): hacky fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbeckers committed Feb 3, 2023
1 parent c27712a commit bf9a073
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/pages/workstream/[workstreamID].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,12 @@ const Workstream: NextPage = () => {
(contributor) => contributor.user
);

//TODO Merge evaluations into averages
const getAverageEvaluations = (evaluations: Evaluation[]) => {
const merged = _.mergeWith({}, ...evaluations, (objValue, srcValue) =>
(objValue || []).concat(srcValue)
const merged = _.mergeWith(
{},
...evaluations,
(objValue: any, srcValue: any) => (objValue || []).concat(srcValue)
);

console.log("merged: ", merged);
Expand All @@ -104,7 +107,7 @@ const Workstream: NextPage = () => {
const _contributors = contributors?.map((contributor) => contributor.id);
const _vFux: BigNumberish[] = [];

if (!_contributors || !_vFux) {
if (!_contributors || !_vFux || _vFux.length === 0) {
console.log("invalid input");
return;
}
Expand Down

0 comments on commit bf9a073

Please sign in to comment.