fix: unused variable

This commit is contained in:
Thomas Zarebczan 2019-11-27 11:53:41 -05:00 committed by Sean Yesmunt
parent 722c0b978c
commit 4e55415763

View file

@ -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 {