Fix jsonl database export format

This commit is contained in:
hzrd149 2024-02-27 12:37:36 +00:00
parent 2d0a906264
commit cfa0461472
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"nostrudel": patch
---
Fix jsonl database export format

View File

@ -99,7 +99,7 @@ export default function DatabaseSettings() {
setExporting(true); setExporting(true);
const rows = await localDatabase.getAll("events"); const rows = await localDatabase.getAll("events");
const lines = rows.map((row) => stringify(row.event)); const lines = rows.map((row) => stringify(row.event));
const file = new File(lines, "noStrudel-export.jsonl", { const file = new File([lines.join("\n")], "noStrudel-export.jsonl", {
type: "application/jsonl", type: "application/jsonl",
}); });
const url = URL.createObjectURL(file); const url = URL.createObjectURL(file);