facebook/react-page-middleware — pull request #9 by abhilashi (2013-11-21 11:44:47+00:00)
Title: Safely reference getWindowSize

process.stdout doesn't seem to have the method getWindowSize. I don't know the original intent behind writing this. So keeping the existing behavior as it as and making it safe.

```
{ _connecting: false,
_handle:
{ fd: 1,
writeQueueSize: 0,
owner: [Circular],
onread: [Function: onread] },
_readableState:
{ highWaterMark: 16384,
buffer: [],
length: 0,
pipes: null,
pipesCount: 0,
flowing: false,
ended: false,
endEmitted: false,
reading: false,
calledRead: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
objectMode: false,
defaultEncoding: 'utf8',
ranOut: false,
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: false,
domain: null,
_events:
{ end: { [Function: g] listener: [Function: onend] },
finish: [Function: onSocketFinish],
_socketEnd: [Function: onSocketEnd] },
_maxListeners: 10,
_writableState:
{ highWaterMark: 16384,
objectMode: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
decodeStrings: false,
defaultEncoding: 'utf8',
length: 0,
writing: false,
sync: false,
bufferProcessing: false,
onwrite: [Function],
writecb: null,
writelen: 0,
buffer: [] },
writable: true,
allowHalfOpen: false,
onend: null,
destroyed: false,
errorEmitted: false,
bytesRead: 0,
_bytesDispatched: 3655,
_pendingData: null,
_pendingEncoding: '',
columns: 172,
rows: 43,
_type: 'tty',
fd: 1,
_isStdio: true,
destroySoon: [Function],
destroy: [Function] }
```

This failed when I deployed on heroku. Steps to repro:

Clone the repo.

Have heroku toolbelt installed.
foreman start