Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(56)

Unified Diff: features/src/main/javascript/features/opensocial-templates/container.js

Issue 91041: Client support for multiple required libraries SVN Base: http://svn.apache.org/repos/asf/incubator/shindig/trunk/
Patch Set: Fixed an error when opensocial-data is not present Created 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side by-side-diff with in-line comments
Download patch
« no previous file | no next file » | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]);
+ }
+ }
}
};
« no previous file | no next file »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r497