lazy format to JSON

pull/1/head
yann300 7 years ago
parent c0bb803892
commit 68c89f4e33
  1. 3
      src/app/files/basicReadOnlyExplorer.js

@ -36,6 +36,9 @@ class BasicReadOnlyExplorer {
}
addReadOnly (path, content) {
try { // lazy try to format JSON
content = JSON.stringify(JSON.parse(content), null, '\t')
} catch (e) {}
this.files[this.type + '/' + path] = content
this.event.trigger('fileAdded', [this.type + '/' + path, true])
return true

Loading…
Cancel
Save