@ -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...
readOnlyFolder = true;
@ -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,