diff --git a/app/assets/javascripts/services/archiveManager.ts b/app/assets/javascripts/services/archiveManager.ts index bb2442ac9..600d36c34 100644 --- a/app/assets/javascripts/services/archiveManager.ts +++ b/app/assets/javascripts/services/archiveManager.ts @@ -3,7 +3,8 @@ import { EncryptionIntent, ContentType, SNNote, - BackupFile + BackupFile, + PayloadContent, } from '@standardnotes/snjs'; function zippableTxtName(name: string, suffix = ""): string { @@ -106,8 +107,8 @@ export class ArchiveManager { let name, contents; if (item.content_type === ContentType.Note) { const note = item as SNNote; - name = note.title; - contents = note.text; + name = (note.content as PayloadContent).title; + contents = (note.content as PayloadContent).text; } else { name = item.content_type; contents = JSON.stringify(item.content, null, 2); diff --git a/app/assets/javascripts/services/desktopManager.ts b/app/assets/javascripts/services/desktopManager.ts index 3fb873bfb..9da6afcf3 100644 --- a/app/assets/javascripts/services/desktopManager.ts +++ b/app/assets/javascripts/services/desktopManager.ts @@ -197,7 +197,9 @@ export class DesktopManager extends ApplicationService { } async desktop_requestBackupFile() { - const data = this.application!.createBackupFile(EncryptionIntent.FileEncrypted); + const data = await this.application!.createBackupFile( + EncryptionIntent.FileEncrypted + ); if (data) { return JSON.stringify(data, null, 2); }