We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d85d4d7 + 0041f29 commit 2921eeeCopy full SHA for 2921eee
js/history.js
@@ -28,7 +28,11 @@ var Josh = Josh || {};
28
var _key = config.key || 'josh.history';
29
30
if (_storage) {
31
- var data = _storage.getItem(_key);
+ try {
32
+ var data = _storage.getItem(_key);
33
+ } catch(e) {
34
+ _console.log("Error accessing storage");
35
+ }
36
if (data) {
37
_history = JSON.parse(data);
38
_searchCursor = _cursor = _history.length - 1;
@@ -38,7 +42,11 @@ var Josh = Josh || {};
42
}
39
43
function save() {
40
44
41
- _storage.setItem(_key, JSON.stringify(_history));
45
46
+ _storage.setItem(_key, JSON.stringify(_history));
47
48
49
50
51
52
0 commit comments