From 9ed318951cf39c4840af7ee352ff1e95ce9acbbe Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Mon, 4 Mar 2019 08:52:46 -0800 Subject: [PATCH] Minor comment updates --- lib/mixins/property-effects.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/mixins/property-effects.js b/lib/mixins/property-effects.js index c60a0341b0..c6164ffc38 100644 --- a/lib/mixins/property-effects.js +++ b/lib/mixins/property-effects.js @@ -82,7 +82,8 @@ let DataEffect; //eslint-disable-line no-unused-vars * * @param {Object} model Prototype or instance * @param {string} type Property effect type - * @param {boolean=} cloneArrays Clone any arrays mapped in the map + * @param {boolean=} cloneArrays Clone any arrays assigned to the map when + * extending a superclass map onto this subclass * @return {Object} The own-property map of effects for the given type * @private */ @@ -2356,7 +2357,11 @@ export const PropertyEffects = dedupingMixin(superClass => { throw new Error("Malformed computed expression '" + expression + "'"); } const info = createMethodEffect(this, sig, TYPES.COMPUTE, runComputedEffect, property, dynamicFn); - ensureOwnEffectMap(this, COMPUTE_INFO)[property] = info; + if (orderedComputed) { + // Effects are normally stored as map of dependency->effect, but for + // ordered computation, we also need tree of computedProp->dependencies + ensureOwnEffectMap(this, COMPUTE_INFO)[property] = info; + } } /**