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

fixed: temporary workaround for calculations not updating when they a… #746

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading