diff --git a/public/js/src/module/calculate.js b/public/js/src/module/calculate.js index 2b8de62b..6c918a79 100644 --- a/public/js/src/module/calculate.js +++ b/public/js/src/module/calculate.js @@ -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); };