Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-1723

runAction function in action_container.js receives an empty array when it calls the registry.getGadgetSites instead of "undefined"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.0-beta1
    • Fix Version/s: 2.5.0-beta2
    • Component/s: Javascript
    • Labels:
      None

      Description

      runAction function receives an empty array when it calls the registry.getGadgetSites instead of "undefined", which is what it receives when gadget loading works in earlier builds. Therefore, the first section in "if (!gadgetSites)" below doesn't get run and instead it incorrectly goes to the "else". .getGadgetSites appears to now always return an array and it will be empty if there aren't any sites instead of "undefined" like in the past.

      runAction: function(actionId, opt_selection) {
      var action = registry.getItemById(actionId);
      if (action) {
      // if gadget site has not been registered yet
      // the gadget needs to be rendered
      var gadgetSites = registry.getGadgetSites(actionId);
      if (!gadgetSites) {
      var gadgetUrl = registry.getUrl(actionId);
      pendingActions[actionId] = {
      selection: opt_selection || container_.selection.getSelection()
      };
      // set optional params
      ......
      },

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              yaozhang Yao Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: