diff --git a/handler-js.js b/handler-js.js
index <HASH>..<HASH> 100644
--- a/handler-js.js
+++ b/handler-js.js
@@ -79,6 +79,7 @@ function wreq (state, bundler, startFn) {
 
   update()
   bundler.on('update', update)
+  state.cssStream.on('finish', onCssStreamFinish)
 
   return handler
 
@@ -108,6 +109,12 @@ function wreq (state, bundler, startFn) {
     }))
   }
 
+  function onCssStreamFinish () {
+    state.cssStream = new stream.PassThrough()
+    state.cssStream.on('finish', onCssStreamFinish)
+    state.cssStream.pipe(state.cssBuf)
+  }
+
   // call the handler function
   function handler (req, res, next) {
     if (pending) {
fix: avoid write after end errors

This fix aims at avoiding the errors related to b<I>b4fb.
The idea behind this is to ensure `state.cssStream` is always writable,
even when `extract-css` calls `WriteableStream.prototype.end` on it.