facebook/react — pull request #1969 by brigand (2014-08-01 02:09:02+00:00)
Title: add more information to isValidDescriptor invariant error

Just a minor tweak to tell you what's being returned (I had a problem where an array was being returned earlier today).

This ternary is completely to work around a bug in PhantomJS's implementation of Object::toString which gives DOMWindow for some reason when called on `undefined` or `null` and caused the tests to fail. V8, SM, and JSC all work correctly for all values (per spec).

```js
renderedComponent === undefined
? 'Undefined'
: Object.prototype.toString.call(renderedComponent).slice(8, -1),
```