publish: handle 'no notebooks' case

This commit is contained in:
Matilde Park 2020-03-27 16:44:15 -04:00
parent 952ea831d9
commit 1c45d4c46c

View File

@ -71,7 +71,7 @@ export class Sidebar extends Component {
return (selectedPaths.includes(each)); return (selectedPaths.includes(each));
}) })
.map((each, i) => { .map((each, i) => {
let books = groupedNotebooks[each]; let books = groupedNotebooks[each] || [];
if (books.length === 0) return; if (books.length === 0) return;
if ((selectedGroups.length === 0) && if ((selectedGroups.length === 0) &&
groupedNotebooks["/~/"] && groupedNotebooks["/~/"] &&