Skip to content

Commit

Permalink
fix(localStorageService): fix cookie serialization(object/array) issue:
Browse files Browse the repository at this point in the history
  • Loading branch information
a8m committed Oct 6, 2014
1 parent 44575f4 commit 7493cd8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/angular-local-storage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
(function() {
/* Start angularLocalStorage */
'use strict';
var angularLocalStorage = angular.module('LocalStorageModule', []);

Expand Down Expand Up @@ -286,6 +284,8 @@ angularLocalStorage.provider('localStorageService', function() {

if (typeof value === "undefined") {
return false;
} else if(angular.isArray(value) || angular.isObject(value)) {
value = angular.toJson(value);
}

if (!browserSupportsCookies()) {
Expand Down Expand Up @@ -427,4 +427,3 @@ angularLocalStorage.provider('localStorageService', function() {
};
}];
});
}).call(this);

0 comments on commit 7493cd8

Please sign in to comment.