Skip to content

Commit

Permalink
Merge pull request #30 from Simon-Initiative/fix-evaluation-randomness
Browse files Browse the repository at this point in the history
Fix variable evaluations when it has a random number
  • Loading branch information
darrensiegel authored Oct 6, 2020
2 parents e71c21f + 23cab77 commit 6cb5fc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/eval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ function aggregateResults(results: Evaluation[][]): Evaluation[] {
(acc, evaluation) =>
didFail(evaluation)
? (acc[evaluation.variable] = 'Error - check this variable\'s code', acc)
: acc[evaluation.variable]
: acc.hasOwnProperty(evaluation.variable)
? acc
: (acc[evaluation.variable] = evaluation.result || '', acc),
: (acc[evaluation.variable] = evaluation.result as string, acc),
map);

const eitherErrorOrEvaluationsMap = (evaluations: Evaluation[]) =>
Expand Down

0 comments on commit 6cb5fc0

Please sign in to comment.