Skip to content

Commit

Permalink
mobile: add a ? check before checking if note exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarahm-ed authored and thecodrr committed Sep 8, 2022
1 parent 5689254 commit 9c32196
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/mobile/app/hooks/use-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const useActions = ({ close = () => null, item }) => {
const currentScreen = useNavigationStore.getState().currentScreen;
if (item.type !== "note" || currentScreen.name !== "TopicNotes") return;
return (
db.notes?.topicReferences.get(currentScreen.id).indexOf(item.id) > -1
db.notes?.topicReferences?.get(currentScreen.id)?.indexOf(item.id) > -1
);
};

Expand Down

0 comments on commit 9c32196

Please sign in to comment.