Clean up messy merge

feature/default_network_editable
frankiebee 8 years ago
parent 54e157020e
commit 4451593867
  1. 13
      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)
})
})

Loading…
Cancel
Save