diff --git a/src/core/components/highlight-code.jsx b/src/core/components/highlight-code.jsx index 5cfa9d61..ab971ea5 100644 --- a/src/core/components/highlight-code.jsx +++ b/src/core/components/highlight-code.jsx @@ -26,10 +26,11 @@ export default class HighlightCode extends Component { this.setState({ contentsHidden: !this.state.contentsHidden }) } - downloadJSON = (value) => { - let fileName = 'response' - let fileToSave = new Blob([value], {type: 'text/json', name: fileName}) - saveAs(fileToSave) + downloadJSON = () => { + let content = this.props.value + let fileName = "response" + let fileToSave = new Blob([content], {type: 'text/plain'}) + saveAs(fileToSave, fileName) } render () { @@ -39,6 +40,9 @@ export default class HighlightCode extends Component { return (
@@ -46,12 +50,7 @@ export default class HighlightCode extends Component {
{ value.length > 600 &&