Uploaded image for project: 'Fluid Infusion'
  1. Fluid Infusion
  2. FLUID-5250

Using an object as the return value for a conditional transform doesn't work

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • 1.5
    • None

    Description

      Simple conditional transforms where the results for the true and false conditions are strings returns the correct value, however if an object is used for the result the conditional expander no longer works.

      In the example case below both the values from the true and false objects are used. Note: I've also had other cases where only the true condition is returned regardless of the conditionalPath value and others where an empty object is returned.

      example:

      var model =

      { a: "v1", b: "v2", con: false }

      ;

      var rules = {
      value: {
      transform: {
      type: "fluid.transforms.condition",
      conditionPath: "con",
      "true":

      { newA: "a", newB: "b", conditonUsed: "con" }

      ,
      "false":

      { conditionUsed: "con" }

      }
      }
      };

      fluid.model.transform(model, rules);

      Attachments

        Issue Links

          Activity

            People

              jobara Justin Obara
              jobara Justin Obara
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: