Revert "Don't automatically sign in if there is no token available"

This commit breaks login in Safari, without it people will need log out
and log in again if they experienced 401 requests on the profile page,
but we can't break Safari.

It seems that the root cause of the error is the fact that auto sign in
fails in Safari.

This reverts commit d84b3581eb.
This commit is contained in:
Piotr Sarnacki 2012-12-10 13:53:35 +01:00
parent 0829825a14
commit a662d03ee7

View File

@ -19,7 +19,7 @@
global = localStorage.getItem('travis.user')
session = sessionStorage.getItem('travis.user')
user = session || global
if user && localStorage.getItem('travis.token')
if user
localStorage.setItem('travis.user', user) unless global
data = JSON.parse(user)
data = { user: data } unless data.user?