Merge pull request #72 from AdamQuadmon/fixCookieNotDefined
Fix Cookie not Defined issues
This commit is contained in:
commit
082df22dcc
2
angular-local-storage.js
vendored
2
angular-local-storage.js
vendored
@ -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)===' ') {
|
||||
|
Reference in New Issue
Block a user