Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #746 from OpenClinica/fix/issue730
Browse files Browse the repository at this point in the history
fixed: temporary workaround for calculations not updating when they a…
  • Loading branch information
kkrumlian authored Feb 1, 2024
2 parents 1aaa6e6 + a6de8d1 commit 055851a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions public/js/src/module/calculate.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ calculationModule._updateCalc = function (control, props, emptyNonRelevant) {
!control.matches('[readonly]')
);

if (emptyNonRelevant) {
// We're temporarily disabling this cache because it is causing this bug
// https://github.com/OpenClinica/enketo-express-oc/issues/730
// which we don't quite understand yet, but need to fix urgently.
// A proper fix would have to be created in enketo/enketo after which we should remove this clause
// (and improve performance).
this.preInitRelevance = new WeakMap();
}

return this._originalUpdateCalc(control, props, emptyNonRelevant);
};

Expand Down

0 comments on commit 055851a

Please sign in to comment.