Fixed json and xml file rendering in code preview (#4642)

Этот коммит содержится в:
Harrison Healey
2016-11-23 11:12:37 -05:00
коммит произвёл GitHub
родитель fd019eefbb
Коммит 48533aa483

Просмотреть файл

@@ -51,13 +51,18 @@ export default class CodePreview extends React.Component {
async: true,
url: props.fileUrl,
type: 'GET',
dataType: 'text',
error: this.handleReceivedError,
success: this.handleReceivedCode
});
}
handleReceivedCode(data) {
this.setState({code: data, loading: false, success: true});
this.setState({
code: data,
loading: false,
success: true
});
}
handleReceivedError() {