- Note had been corrupted when the passphrase was empty.
This commit is contained in:
vorotamoroz 2022-04-26 18:32:27 +09:00
parent b2ce4593b9
commit 24b3b7d8b1

View File

@ -169,7 +169,7 @@ async function putDBEntry(note: LoadedEntry, passphrase: string, database: Pouch
leafid = "h:" + hashedPiece;
//have to make
const savePiece = await encrypt(piece, passphrase);
const savePiece = passphrase != "" ? await encrypt(piece, passphrase) : piece;
const d: EntryLeaf = {
_id: leafid,