publish: prevent crash on unmanaged notebooks

This commit is contained in:
Matilde Park 2020-10-06 13:58:30 -04:00
parent 8338bf7ac8
commit ae25d948d5

View File

@ -70,7 +70,7 @@ export class Notebook extends PureComponent<
const relativePath = (p: string) => this.props.baseUrl + p; const relativePath = (p: string) => this.props.baseUrl + p;
const contact = notebookContacts[ship]; const contact = notebookContacts?.[ship];
const role = group ? roleForShip(group, window.ship) : undefined; const role = group ? roleForShip(group, window.ship) : undefined;
const isOwn = `~${window.ship}` === ship; const isOwn = `~${window.ship}` === ship;
const isAdmin = role === "admin" || isOwn; const isAdmin = role === "admin" || isOwn;