diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js
index d850d6532..a09869a08 100644
--- a/www/common/common-ui-elements.js
+++ b/www/common/common-ui-elements.js
@@ -759,6 +759,8 @@ define([
var teams = {};
if (privateData.enableTeams) {
Object.keys(teamsData).forEach(function (id) {
+ // config.teamId only exists when we're trying to share a pad from a team drive
+ // In this case, we don't want to share the pad with the current team
if (config.teamId && config.teamId === id) { return; }
var t = teamsData[id];
teams[t.edPublic] = {
@@ -769,7 +771,7 @@ define([
id: id
};
});
- var teamsList = UIElements.getFriendsList('Share with a team', {
+ var teamsList = UIElements.getFriendsList('Share with a team', { // XXX
common: common,
noFilter: true,
friends: teams
diff --git a/www/common/notifications.js b/www/common/notifications.js
index 5c8db3806..6c1fd3c25 100644
--- a/www/common/notifications.js
+++ b/www/common/notifications.js
@@ -262,6 +262,7 @@ define([
var teamName = Util.fixHTML(Util.find(msg, ['content', 'team', 'metadata', 'name']) || '');
content.getFormatText = function () {
var text = name + " has invited you to join the team " + teamName +"";
+ // XXX
return text;
};
if (!content.archived) {
@@ -280,6 +281,7 @@ define([
var teamName = Util.fixHTML(Util.find(msg, ['content', 'teamName']) || '');
content.getFormatText = function () {
var text = name + " has kicked you from join the team " + teamName +"";
+ // XXX
return text;
};
if (!content.archived) {
diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js
index e83cd441a..8f4d7854b 100644
--- a/www/common/outer/async-store.js
+++ b/www/common/outer/async-store.js
@@ -66,7 +66,7 @@ define([
if (!s) { return void cb({ error: 'ENOTFOUND' }); }
nThen(function (waitFor) {
Realtime.whenRealtimeSyncs(s.realtime, waitFor());
- if (s.sharedFolders) {
+ if (s.sharedFolders && typeof (s.sharedFolders) === "object") {
for (var k in s.sharedFolders) {
Realtime.whenRealtimeSyncs(s.sharedFolders[k].realtime, waitFor());
}