Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: crash when notebook topics are undefined

thecodrrd99368f22360
diff --git a/apps/web/src/components/notebook/index.js b/apps/web/src/components/notebook/index.js
index de39ffc54..104a887b6 100644
--- a/apps/web/src/components/notebook/index.js
+++ b/apps/web/src/components/notebook/index.js
@@ -33,7 +33,7 @@ class Notebook extends React.Component {
footer={
<>
<Flex sx={{ marginBottom: 1, marginTop: 1 }}>
- {notebook.topics.slice(1, 4).map((topic) => (
+ {notebook?.topics?.slice(1, 4).map((topic) => (
<Flex
key={topic.id}
onClick={(e) => {