Skip to content

Commit 6b8f249

Browse files
committed
build v0.2.2
1 parent f973da7 commit 6b8f249

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<a name="0.2.2"></a>
2+
3+
# 0.2.2 (2015-29-05)
4+
- build v0.2.2
5+
- fix(localStorage): parsing safety #230
6+
17
<a name="0.2.1"></a>
28

39
# 0.2.1 (2015-18-05)

dist/angular-local-storage.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* An Angular module that gives you access to the browsers local storage
3-
* @version v0.2.1 - 2015-05-18
3+
* @version v0.2.2 - 2015-05-29
44
* @link https://github.com/grevory/angular-local-storage
55
* @author grevory <[email protected]>
66
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -181,7 +181,11 @@ angularLocalStorage.provider('localStorageService', function() {
181181
return null;
182182
}
183183

184-
return JSON.parse(item);
184+
try {
185+
return JSON.parse(item);
186+
} catch (e) {
187+
return item;
188+
}
185189
};
186190

187191
// Remove an item from local storage

dist/angular-local-storage.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)