| Index: features/src/main/javascript/features/opensocial-templates/container.js |
| =================================================================== |
| --- features/src/main/javascript/features/opensocial-templates/container.js (revision 790594) |
| +++ features/src/main/javascript/features/opensocial-templates/container.js (working copy) |
| @@ -202,7 +202,7 @@ |
| */ |
| os.Container.getDefaultContext = function() { |
| if ((window['gadgets'] && gadgets.util.hasFeature('opensocial-data')) || |
| - (opensocial.data.getDataContext)) { |
| + (opensocial.data && opensocial.data.getDataContext)) { |
| return os.createContext(opensocial.data.getDataContext().getData()); |
| } |
| return os.createContext({}); |
| @@ -376,7 +376,13 @@ |
| // Honor the "requireLibrary" feature param. |
| // TODO: Support multiple params when Shindig does. |
| if (params.requireLibrary) { |
| - os.Container.addRequiredLibrary(params.requireLibrary); |
| + if (typeof params.requireLibrary == "string") { |
| + os.Container.addRequiredLibrary(params.requireLibrary); |
| + } else { |
| + for (var i = 0; i < params.requireLibrary.length; i++) { |
| + os.Container.addRequiredLibrary(params.requireLibrary[i]); |
| + } |
| + } |
| } |
| }; |