From 4b9b59b3c70ae9adb88ff6a4eb6c0032ff10c9bc Mon Sep 17 00:00:00 2001 From: Misode Date: Thu, 11 Mar 2021 17:41:43 +0100 Subject: [PATCH] Fix #133 Incorrect download contents --- src/app/components/panels/SourcePanel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/panels/SourcePanel.ts b/src/app/components/panels/SourcePanel.ts index 1b773154..4dd66a78 100644 --- a/src/app/components/panels/SourcePanel.ts +++ b/src/app/components/panels/SourcePanel.ts @@ -35,7 +35,7 @@ export const SourcePanel = (view: View, model: DataModel) => { Tracker.copy() } const downloadSource = (el: Element) => { - const fileContents = encodeURIComponent(JSON.stringify(model.data, null, 2) + "\n") + const fileContents = encodeURIComponent(App.jsonOutput.get() + '\n') const downloadAnchor = el.lastElementChild as HTMLAnchorElement downloadAnchor.setAttribute('href', 'data:text/json;charset=utf-8,' + fileContents) downloadAnchor.setAttribute("download", "data.json")