Skip to content

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

fix error restoring file when picked from document picker

ammarahm-ed2b085a3d48a9
diff --git a/apps/mobile/src/components/RestoreDialog/index.js b/apps/mobile/src/components/RestoreDialog/index.js
index 090618a4b..c1a960575 100644
--- a/apps/mobile/src/components/RestoreDialog/index.js
+++ b/apps/mobile/src/components/RestoreDialog/index.js
@@ -197,7 +197,8 @@ const RestoreDataComponent = ({close, setRestoring, restoring}) => {
if (restoring) {
return;
}
- DocumentPicker.pick()
+
+ DocumentPicker.pickSingle()
.then(r => {
setRestoring(true);
fetch(r.uri).then(async r => {
@@ -224,7 +225,7 @@ const RestoreDataComponent = ({close, setRestoring, restoring}) => {
context: 'local'
});
}
- });
+ }).catch(console.log)
})
.catch(console.log);
}