Merge pull request #72 from AdamQuadmon/fixCookieNotDefined

Fix Cookie not Defined issues
This commit is contained in:
Gregory Pike 2014-02-12 02:07:06 -05:00
commit 082df22dcc

View File

@ -297,7 +297,7 @@ angularLocalStorage.provider('localStorageService', function(){
return false;
}
var cookies = $document.cookie.split(';');
var cookies = $document.cookie && $document.cookie.split(';') || [];
for(var i=0;i < cookies.length;i++) {
var thisCookie = cookies[i];
while (thisCookie.charAt(0)===' ') {