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,
|
||||
function(response) {
|
||||
if (response.statusCode === 200) {
|
||||
let body = '';
|
||||
let i = 0;
|
||||
let data = '';
|
||||
response.on('data', function(chunk) {
|
||||
i = i + 1;
|
||||
body += chunk;
|
||||
data += chunk;
|
||||
});
|
||||
response.on(
|
||||
'end',
|
||||
function() {
|
||||
this.setState({ content: body, loading: false });
|
||||
this.setState({ content: data, loading: false });
|
||||
}.bind(this)
|
||||
);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue