codejoust / session.js

Session.js - Get user session information
Other
1.2k stars 84 forks source link

Hotfix "Cannot set property 'version' of null" error #18

Closed alampros closed 12 years ago

alampros commented 12 years ago

@x909 suggested this fix in #16. Just refactored and submitted a pullreq for your pleasure.

In Safari/Webkit, the error looks like this:

TypeError: 'null' is not an object (evaluating 'obj.version = API_VERSION'). session.js:373

And for Chrome:

Uncaught TypeError: Cannot set property 'version' of null. session.js:373