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.
1 parent d85d4d7 commit e5661b0Copy full SHA for e5661b0
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;
@@ -37,8 +41,10 @@ var Josh = Josh || {};
41
}
42
39
43
function save() {
40
- if (_storage) {
44
45
_storage.setItem(_key, JSON.stringify(_history));
46
47
48
49
50
0 commit comments