diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index dc4c8c1ab..b0add7044 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -3364,7 +3364,7 @@ define([ if (APP.readOnly) { // Read-only drive (team?) $content.prepend($readOnly.clone()); - } else if (folders[sfId] && folders[sfId].readOnly) { + } else if (sfId && folders[sfId] && folders[sfId].readOnly) { // If readonly shared folder... $content.prepend($readOnly.clone()); readOnlyFolder = true; diff --git a/www/teams/inner.js b/www/teams/inner.js index f571d5c84..23c333891 100644 --- a/www/teams/inner.js +++ b/www/teams/inner.js @@ -297,7 +297,7 @@ define([ // Provide secondaryKey var teamData = (privateData.teams || {})[id] || {}; - driveAPP.readOnly = !teamData.secondaryKey; + driveAPP.readOnly = !teamData.hasSecondaryKey; var drive = DriveUI.create(common, { proxy: proxy, folders: folders,