A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix: crash when an item was removed from Virtuouso
thecodrrc9866fe6c7ec
diff --git a/apps/web/src/components/list-container/index.js b/apps/web/src/components/list-container/index.jsindex 729dd820a..c23dff686 100644--- a/apps/web/src/components/list-container/index.js+++ b/apps/web/src/components/list-container/index.js@@ -44,7 +44,11 @@ function ListContainer(props) {overflowX: "hidden",}}totalCount={props.items.length}- item={(index) => props.item(index, props.items[index])}+ item={(index) => {+ const item = props.items[index];+ if (!item) return null;+ return props.item(index, item);+ }}/>) : null}</Flex>diff --git a/apps/web/src/components/note/index.js b/apps/web/src/components/note/index.jsindex fec23c352..cff0b6e2a 100644--- a/apps/web/src/components/note/index.js+++ b/apps/web/src/components/note/index.js@@ -163,8 +163,6 @@ export default React.memo(Note, function (prevProps, nextProps) {const prevItem = prevProps.item;const nextItem = nextProps.item;- // do not update if the item was removed- if (!prevItem || !nextItem) return true;return (prevItem.pinned === nextItem.pinned &&prevItem.favorite === nextItem.favorite &&diff --git a/apps/web/src/views/Home.js b/apps/web/src/views/Home.jsindex e279281ed..4a0f5cccc 100644--- a/apps/web/src/views/Home.js+++ b/apps/web/src/views/Home.js@@ -42,11 +42,12 @@ function Home() {</Box>);}}- item={(index, groupIndex) =>- notes.groupCounts[groupIndex] && (+ item={(index, groupIndex) => {+ if (!notes.groupCounts[groupIndex] || !notes.items[index]) return;+ return (<Note index={index} pinnable={true} item={notes.items[index]} />- )- }+ );+ }}/></ListContainer>);