Listeners specified in a demands block will be registered twice
Description
This problem did not appear in any released version of the framework, but plagued several revisions following the FLUID-4330 reform. It turns out that it was caused by some of the reforms to fluid.embodyDemands aimed at dealing with - material supplied in a demands block became "double accounted" as a result of also being sent to a record of type subcomponentRecord as a result of the still rather haphazard logic in fluid.embodyDemands. The opportunity was taken to remove a few more redundant operations in this method as well as fixing the error - however, it can't be reformed completely until manual component initialisation is discontinued.
This problem did not appear in any released version of the framework, but plagued several revisions following the FLUID-4330 reform. It turns out that it was caused by some of the reforms to fluid.embodyDemands aimed at dealing with - material supplied in a demands block became "double accounted" as a result of also being sent to a record of type subcomponentRecord as a result of the still rather haphazard logic in fluid.embodyDemands. The opportunity was taken to remove a few more redundant operations in this method as well as fixing the error - however, it can't be reformed completely until manual component initialisation is discontinued.
Observed in simple material like the following:
fluid.demands("fluid.tests.demandListeners", [], {
options: {
listeners: {
demandEvent: "fluid.tests.demandRecording"
}
}
});