Undefined options value causes corruption in options merging
Description
Ordinarily it is not possible for a component's options to hold the value undefined but this can be achieved when sourcing subcomponent options wholesale from an undefined source, e.g.
This ends up falling foul of a faulty optimisation written very early into the 2011-era options merging pipeline:
This produces a "sources" array one shorter than the original strategies array and ensure that the last options distribution, whatever it is, will be lost.
For example, with multiple options distributions targetting "gradeNames".
What we have tried to write is
targetting
but note that the "patterns" is plastered onto the enactor itself with
and that in the Infusion 5 prefs framework we have
but which we at the same time distributed in via
We found that due to the mutation-fest in fluid.makeMergeStrategy that the expanded "targets" were off by one after the first one targetting gradeNames. This can't really be economically resolved until we axe the whole options merging pipeline and go towards an immutable mat-based system for Infusion 6.
Ordinarily it is not possible for a component's options to hold the value
undefined
but this can be achieved when sourcing subcomponent options wholesale from an undefined source, e.g.This ends up falling foul of a faulty optimisation written very early into the 2011-era options merging pipeline:
This produces a "sources" array one shorter than the original strategies array and ensure that the last options distribution, whatever it is, will be lost.
For example, with multiple options distributions targetting "gradeNames".
What we have tried to write is
targetting
but note that the "patterns" is plastered onto the enactor itself with
and that in the Infusion 5 prefs framework we have
but which we at the same time distributed in via
We found that due to the mutation-fest in fluid.makeMergeStrategy that the expanded "targets" were off by one after the first one targetting gradeNames. This can't really be economically resolved until we axe the whole options merging pipeline and go towards an immutable mat-based system for Infusion 6.