From 67c8db8b998e2a612aa62925fce165d56e56f7db Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 24 Sep 2019 11:04:13 +0200 Subject: [PATCH 1/2] Fix share with team --- www/share/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/share/main.js b/www/share/main.js index 43e514f58..5e541a9eb 100644 --- a/www/share/main.js +++ b/www/share/main.js @@ -94,6 +94,7 @@ define([ password: config.data.password, isTemplate: config.data.isTemplate, file: config.data.file, + enableTeams: localStorage.CryptPad_teams === "1", }; for (var k in additionalPriv) { metaObj.priv[k] = additionalPriv[k]; } From 5e80efda58695dd29b6de94ac93ad4dea7d60662 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 24 Sep 2019 14:48:52 +0200 Subject: [PATCH 2/2] Fix val is undefined --- www/common/outer/async-store.js | 1 + www/common/proxy-manager.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index d77da7c39..6edfa1299 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -788,6 +788,7 @@ define([ getAllStores().forEach(function (s) { s.manager.getPadAttribute(data, waitFor(function (err, val) { if (err) { return; } + if (!val || typeof(val) !== "object") { return void console.error("Not an object!"); } if (!res.value || res.atime < val.atime) { res.atime = val.atime; res.value = val.value; diff --git a/www/common/proxy-manager.js b/www/common/proxy-manager.js index 1c813304a..ca914b57a 100644 --- a/www/common/proxy-manager.js +++ b/www/common/proxy-manager.js @@ -741,8 +741,12 @@ define([ cb = cb || function () {}; var sfId = Env.user.userObject.getSFIdFromHref(data.href); if (sfId) { + var sfData = Env.user.proxy[UserObject.SHARED_FOLDERS][sfId]; setTimeout(function () { - cb(null, Env.user.proxy[UserObject.SHARED_FOLDERS][sfId][data.attr]); + cb(null, { + value: sfData[data.attr], + atime: 1 + }); }); return; }