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; + } } /**