diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-07-13 12:07:50 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-07-13 12:07:50 -0400 |
commit | 6447af758cd27216d036e06b385770999dc213b1 (patch) | |
tree | 82c55cc2e441fa7eb51b57336e91897ee2571bcd /web/react/stores/error_store.jsx | |
parent | 6cc8788193630b802375669c72fab02220cb692a (diff) | |
parent | 6a559febc292c272da24df440d80ae3b26a31d7f (diff) | |
download | chat-6447af758cd27216d036e06b385770999dc213b1.tar.gz chat-6447af758cd27216d036e06b385770999dc213b1.tar.bz2 chat-6447af758cd27216d036e06b385770999dc213b1.zip |
Merge pull request #163 from ralder/fix-and-refactor-browser-store
[webui] second bugfix for pr #150 and refactor BrowserStore
Diffstat (limited to 'web/react/stores/error_store.jsx')
-rw-r--r-- | web/react/stores/error_store.jsx | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/web/react/stores/error_store.jsx b/web/react/stores/error_store.jsx index 3aed6aef2..203b692ec 100644 --- a/web/react/stores/error_store.jsx +++ b/web/react/stores/error_store.jsx @@ -29,18 +29,11 @@ var ErrorStore = assign({}, EventEmitter.prototype, { BrowserStore.removeItem("last_error"); }, getLastError: function() { - var error = null; - try { - error = JSON.parse(BrowserStore.getItem("last_error")); - } - catch (err) { - } - - return error; + return BrowserStore.getItem('last_error'); }, _storeLastError: function(error) { - BrowserStore.setItem("last_error", JSON.stringify(error)); + BrowserStore.setItem("last_error", error); }, }); |