diff options
| author | Illniyar | 2013-04-20 23:33:40 +0300 |
|---|---|---|
| committer | Pete Bacon Darwin | 2013-05-08 10:04:07 +0100 |
| commit | cf4729faa3e6e0a5178e2064a6f3cfd345686554 (patch) | |
| tree | 55f983505d88214764943eb48c17f24b30d31a32 /src | |
| parent | 4f2e36068502f18814fee0abd26951124881f951 (diff) | |
| download | angular.js-cf4729faa3e6e0a5178e2064a6f3cfd345686554.tar.bz2 | |
feat($cookieStore): $cookieStore.get now parses blank string as blank string
closes #1918
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngCookies/cookies.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ngCookies/cookies.js b/src/ngCookies/cookies.js index 8b46973f..68355707 100644 --- a/src/ngCookies/cookies.js +++ b/src/ngCookies/cookies.js @@ -139,7 +139,8 @@ angular.module('ngCookies', ['ng']). * @returns {Object} Deserialized cookie value. */ get: function(key) { - return angular.fromJson($cookies[key]); + var value = $cookies[key]; + return value ? angular.fromJson(value) : value; }, /** |
