Skip to content

Commit

Permalink
Added a check around calls to flush() for when compression isn't used.
Browse files Browse the repository at this point in the history
  • Loading branch information
aickin committed Oct 22, 2015
1 parent e538e62 commit 5ef5b4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/renderers/dom/server/ReactServerAsyncRendering.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ function bufferedStream(stream, bufferSize) {

if (this.buffer.length >= bufferSize) {
stream.write(this.buffer);
stream.flush();
if (stream.flush) stream.flush();
this.buffer = "";
}
},

flush: function() {
stream.write(this.buffer);
stream.flush();
if (stream.flush) stream.flush();
},

end: function(data) {
stream.write(this.buffer);
stream.flush();
if (stream.flush) stream.flush();
stream.end(data);
}
}
Expand All @@ -66,7 +66,7 @@ function hashedStream(stream) {
},

flush: function() {
stream.flush();
if (stream.flush) stream.flush();
},

end: function(data) {
Expand Down

0 comments on commit 5ef5b4e

Please sign in to comment.