diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-03-24 05:35:01 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-03-24 05:35:01 +0800 |
commit | 445159386798579f3ed449b8bc4efa00f52a26ac (patch) | |
tree | 7412de6f13572f26650158f18aa1bf119e230eac /library | |
parent | 54e157020e0c57bef336480181e5235396bfd2c0 (diff) | |
download | tangerine-wallet-browser-445159386798579f3ed449b8bc4efa00f52a26ac.tar tangerine-wallet-browser-445159386798579f3ed449b8bc4efa00f52a26ac.tar.gz tangerine-wallet-browser-445159386798579f3ed449b8bc4efa00f52a26ac.tar.bz2 tangerine-wallet-browser-445159386798579f3ed449b8bc4efa00f52a26ac.tar.lz tangerine-wallet-browser-445159386798579f3ed449b8bc4efa00f52a26ac.tar.xz tangerine-wallet-browser-445159386798579f3ed449b8bc4efa00f52a26ac.tar.zst tangerine-wallet-browser-445159386798579f3ed449b8bc4efa00f52a26ac.zip |
Clean up messy merge
Diffstat (limited to 'library')
-rw-r--r-- | library/controllers/index-db-controller.js | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/library/controllers/index-db-controller.js b/library/controllers/index-db-controller.js index 4c03eca46..6bcae9845 100644 --- a/library/controllers/index-db-controller.js +++ b/library/controllers/index-db-controller.js @@ -50,18 +50,9 @@ module.exports = class IndexDbController extends EventEmitter { get (key) { return this.requestObjectStore(key) .then((dataObject)=> { - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { const getRequest = dataObject.get(key) - getRequest.onsuccess = (event) => { - const serialized = event.currentTarget.result - try { - console.log('serialized:',serialized) - const state = serialized ? JSON.parse(serialized) : {} - resolve(state) - } catch (err) { - reject(err) - } - } + getRequest.onsuccess = (event) => resolve(event.currentTarget.result) getRequest.onerror = (event) => reject(event) }) }) |