diff --git a/src/app/files/basicReadOnlyExplorer.js b/src/app/files/basicReadOnlyExplorer.js index f210c5ca63..f6f7d09bb6 100644 --- a/src/app/files/basicReadOnlyExplorer.js +++ b/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