Metadata
- Source
- FLUID-6137
- Type
- Bug
- Priority
- Blocker
- Status
- Closed
- Resolution
- Fixed
- Assignee
- Antranig Basman
- Reporter
- Justin Obara
- Created
2017-02-28T09:44:37.615-0500 - Updated
2017-03-01T11:05:43.789-0500 - Versions
-
- 2.0
- Fixed Versions
-
- 3.0
- Component
-
- Framework
- IoC System
Description
When trying to use distribute options to pass along an option to another component, if using the source property to point at a value of 0, it is not passed along.
Example:
fluid.defaults("fluid.tests.distributeOptionsZero", {
gradeNames: ["fluid.component"],
components: {
child: {
type: "fluid.component"
}
},
toDistribute: 0,
distributeOptions: [{
source: "{that}.options.toDistribute",
target: "{that child}.options.fromSource"
}]
});
However, if the "record" property is used instead, it will be passed along.
Example:
fluid.defaults("fluid.tests.distributeOptionsZero", {
gradeNames: ["fluid.component"],
components: {
child: {
type: "fluid.component"
}
},
distributeOptions: [{
record: 0,
target: "{that child}.options.fromRecord"
}]
});
Comments
-
Justin Obara commented
2017-02-28T09:48:03.557-0500 Test case PR: https://github.com/fluid-project/infusion/pull/817
-
Justin Obara commented
2017-03-01T11:05:33.596-0500 merged PR ( https://github.com/fluid-project/infusion/pull/818 ) into the project repo at 65b4073e25d0befb303cd19ff1e97685b4192b7e