jrburke/r.js — pull request #520 by fhemberger (2013-08-30 09:09:24+00:00)
Title: Check existance of `navigator` with `typeof`.

> If you're running require.js in Node with a virtual DOM like jsdom,
> the global window object may exist but not the global `navigator`.
> This causes the `isBrowser` check to fail with a
> "ReferenceError: navigator is not defined".

I'm currently testing some AMD modules for my Backbone app with mocha and jsdom, so I have a global `window` in Node but no `navigator` object, which lets the `isBrowser` check fail. Although a DOM is present, the check should be false to require the modules correctly in Node.