fix exporting bug on html

This commit is contained in:
ammarahm-ed
2020-12-31 11:47:55 +05:00
parent c57d06aa3e
commit dfdaa7f88a

View File

@@ -65,9 +65,9 @@ async function saveToText(note) {
return null;
}
}
let markdown = await db.notes.note(note.id).export('txt');
let text = await db.notes.note(note.id).export('txt');
path = path + note.title + '.txt';
await RNFetchBlob.fs.writeFile(path, markdown, 'utf8');
await RNFetchBlob.fs.writeFile(path, text, 'utf8');
return {
filePath: path,
@@ -85,9 +85,9 @@ async function saveToHTML(note) {
return null;
}
}
let markdown = await db.notes.note(note.id).export('html');
let html = await db.notes.note(note.id).export('html');
path = path + note.title + '.html';
await RNFetchBlob.fs.writeFile(path, markdown, 'utf8');
await RNFetchBlob.fs.writeFile(path, html, 'utf8');
return {
filePath: path,