Skip to content

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

fix a crash when selecting backup directory

ammarahm-edb5c23f24e5be
diff --git a/apps/mobile/src/components/GeneralSheet/index.js b/apps/mobile/src/components/GeneralSheet/index.js
index 21b61822c..3950ddf27 100644
--- a/apps/mobile/src/components/GeneralSheet/index.js
+++ b/apps/mobile/src/components/GeneralSheet/index.js
@@ -41,6 +41,7 @@ const GeneralSheet = ({context}) => {
) {
return;
}
+ console.log(data);
if (visible || dialogData) {
setDialogData(null);
setVisible(false);
@@ -83,11 +84,11 @@ const GeneralSheet = ({context}) => {
actionSheetRef.current?.setModalVisible(false);
};
- return !visible ? null : (
+ return !visible || !dialogData ? null : (
<SheetWrapper
fwdRef={actionSheetRef}
- gestureEnabled={!dialogData.progress}
- closeOnTouchBackdrop={!dialogData.progress}
+ gestureEnabled={!dialogData?.progress}
+ closeOnTouchBackdrop={!dialogData?.progress}
onClose={() => {
dialogData.onClose && dialogData.onClose();
setVisible(false);