aboutsummaryrefslogtreecommitdiffstats
path: root/library/controllers/index-db-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'library/controllers/index-db-controller.js')
-rw-r--r--library/controllers/index-db-controller.js13
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)
})
})