publish: prevent crash on refreshing notebook

This commit is contained in:
Matilde Park 2020-10-05 14:33:34 -04:00
parent 29ae4fa54b
commit 25ee6053e6

View File

@ -17,7 +17,7 @@ export function PublishResource(props: PublishResourceProps) {
const { association, api, baseUrl, notebooks } = props; const { association, api, baseUrl, notebooks } = props;
const appPath = association["app-path"]; const appPath = association["app-path"];
const [, ship, book] = appPath.split("/"); const [, ship, book] = appPath.split("/");
const notebook = notebooks[ship][book]; const notebook = notebooks[ship]?.[book];
const notebookContacts = props.contacts[association["group-path"]]; const notebookContacts = props.contacts[association["group-path"]];
return ( return (