diff options
-rw-r--r-- | static/panes/tool.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/static/panes/tool.js b/static/panes/tool.js index 3bb123d68..d407efe6b 100644 --- a/static/panes/tool.js +++ b/static/panes/tool.js @@ -518,13 +518,13 @@ Tool.prototype.onCompileResult = function (id, compiler, result) { this.artifactBtn.off('click'); if (toolResult.artifact) { this.artifactBtn.removeClass('d-none'); - this.artifactText.text('Download ' + toolResult.artifactGenerated.title); + this.artifactText.text('Download ' + toolResult.artifact.title); this.artifactBtn.click( _.bind(function () { // The artifact content can be passed either as plain text or as a base64 encoded binary file - if (toolResult.artifactGenerated.type === 'application/octet-stream') { + if (toolResult.artifact.type === 'application/octet-stream') { // Fetch is the most convenient non ES6 way to build a binary blob out of a base64 string - fetch('data:application/octet-stream;base64,' + toolResult.artifactGenerated.content) + fetch('data:application/octet-stream;base64,' + toolResult.artifact.content) .then(res => res.blob()) .then(blob => saveAs(blob, toolResult.artifact.name)); } else { |