mirror of
https://github.com/misode/misode.github.io.git
synced 2026-05-03 06:02:54 +00:00
Fix #133 Incorrect download contents
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user