From e1ddfb2cab20a45876b78c76b99fc98ad9931e2c Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Wed, 24 Jun 2020 18:20:56 +0200 Subject: [PATCH] Fixed a bug where registering a property without `disabledByToggle` breaks recompuation --- app/imports/api/creature/computation/ComputationMemo.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/imports/api/creature/computation/ComputationMemo.js b/app/imports/api/creature/computation/ComputationMemo.js index c52539c8..ffb2a7ab 100644 --- a/app/imports/api/creature/computation/ComputationMemo.js +++ b/app/imports/api/creature/computation/ComputationMemo.js @@ -224,10 +224,17 @@ function isSkillOperation(prop){ } function propDetails(prop){ - return propDetailsByType[prop.type] && propDetailsByType[prop.type]() || {}; + return propDetailsByType[prop.type] && propDetailsByType[prop.type]() || + propDetailsByType.default(); } const propDetailsByType = { + default(){ + return { + toggleAncestors: [], + disabledByToggle: false, + }; + }, toggle(){ return { computed: false,