Created
October 28, 2013 16:14
-
-
Save liorkesos/7199812 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function() { | |
| $.get("/0.1/user", function(data) { | |
| window.user = data.user; | |
| window.online = true; | |
| window.bootstrap(); | |
| }).fail(function(jqXHR, textStatus, errorThrown) { | |
| var userString = localStorage.getItem('ls.localUser'); | |
| window.user = JSON.parse(userString); | |
| window.online = false; | |
| window.bootstrap(); | |
| }).error(function(jqXHR, textStatus, errorThrown) { | |
| var userString = localStorage.getItem('ls.localUser'); | |
| window.user = JSON.parse(userString); | |
| window.online = false; | |
| window.bootstrap(); | |
| }); | |
| }); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The main issue we see is related to reading the info from the localstorage and not from the session info.