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

modelRelay rule with source of "" fails with bare diagnostic

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Data Binder, Framework
    • Labels:
      None

      Description

      A model relay definition as follows:

                  "pcpChannel": {
                      "source": "",
                      "target": "{flowManager}.pcpChannel.model",
                      "singleTransform": {
                          type: "fluid.transforms.identity"
                      }
                  }
      

      will trigger a bare failure in the framework as follows:

      17:23:17.570:  FATAL ERROR: Uncaught exception: Cannot read property 'listenerId' of undefined
      TypeError: Cannot read property 'listenerId' of undefined
          at Object.fluid.registerDirectChangeRelay (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\framework\core\js\DataBinding.js:589:83)
          at Object.fluid.connectModelRelay (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\framework\core\js\DataBinding.js:630:19)
          at Object.fluid.parseModelRelay (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\framework\core\js\DataBinding.js:786:19)
          at E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\framework\core\js\DataBinding.js:882:23
      

      This is because of a lazy falsy check in DataBinding.js fluid.parseModelRelay line 171:

          fluid.parseModelRelay = function (that, mrrec, key) {
              var parsedSource = mrrec.source ? fluid.parseValidModelReference(that, "modelRelay record member \"source\"", mrrec.source) :
                  {path: null, modelSegs: null};
      

        Attachments

          Activity

            People

            Assignee:
            antranig Antranig Basman
            Reporter:
            antranig Antranig Basman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: