Skip to content

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

dont load item if null

ammarahm-ed0d6aa1189a56
diff --git a/apps/mobile/src/components/ActionSheetComponent/index.js b/apps/mobile/src/components/ActionSheetComponent/index.js
index f36ed2be3..5d03c531c 100644
--- a/apps/mobile/src/components/ActionSheetComponent/index.js
+++ b/apps/mobile/src/components/ActionSheetComponent/index.js
@@ -63,22 +63,7 @@ export const ActionSheetComponent = ({
const {colors, premiumUser, user} = state;
const [refreshing, setRefreshing] = useState(false);
const [isPinnedToMenu, setIsPinnedToMenu] = useState(false);
- const [note, setNote] = useState(
- item
- ? item
- : {
- colors: [],
- tags: [],
- pinned: false,
- favorite: false,
- locked: false,
- content: {
- text: null,
- delta: null,
- },
- dateCreated: null,
- },
- );
+ const [note, setNote] = useState(item);
function changeColorScheme(colors = COLOR_SCHEME, accent = ACCENT) {
let newColors = setColorScheme(colors, accent);
@@ -739,7 +724,7 @@ export const ActionSheetComponent = ({
<ActionSheetColorsSection close={close} item={note} />
) : null}
- {hasTags ? (
+ {hasTags && note ? (
<ActionSheetTagsSection
close={close}
item={note}