shindig-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henry Saputra (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SHINDIG-1723) runAction function in action_container.js receives an empty array when it calls the registry.getGadgetSites instead of "undefined"
Date Thu, 08 Mar 2012 02:46:58 GMT

    [ https://issues.apache.org/jira/browse/SHINDIG-1723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13224956#comment-13224956
] 

Henry Saputra commented on SHINDIG-1723:
----------------------------------------

+1 LGTM
                
> runAction function in action_container.js receives an empty array when it calls the registry.getGadgetSites
instead of "undefined"
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1723
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1723
>             Project: Shindig
>          Issue Type: Bug
>          Components: Javascript 
>    Affects Versions: 2.5.0
>            Reporter: Yao Zhang
>         Attachments: SHINDIG-1723.patch
>
>
> 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
> ......
> }, 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message