fix: unused variable
This commit is contained in:
parent
722c0b978c
commit
4e55415763
1 changed files with 3 additions and 5 deletions
|
@ -59,16 +59,14 @@ class DocumentViewer extends React.PureComponent<Props, State> {
|
||||||
source.stream,
|
source.stream,
|
||||||
function(response) {
|
function(response) {
|
||||||
if (response.statusCode === 200) {
|
if (response.statusCode === 200) {
|
||||||
let body = '';
|
let data = '';
|
||||||
let i = 0;
|
|
||||||
response.on('data', function(chunk) {
|
response.on('data', function(chunk) {
|
||||||
i = i + 1;
|
data += chunk;
|
||||||
body += chunk;
|
|
||||||
});
|
});
|
||||||
response.on(
|
response.on(
|
||||||
'end',
|
'end',
|
||||||
function() {
|
function() {
|
||||||
this.setState({ content: body, loading: false });
|
this.setState({ content: data, loading: false });
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue