Fixed json and xml file rendering in code preview (#4642)
Этот коммит содержится в:
коммит произвёл
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() {
|
||||
|
||||
Ссылка в новой задаче
Block a user