Clean up messy merge

feature/default_network_editable
frankiebee 8 years ago
parent 54e157020e
commit 4451593867
  1. 11
      library/controllers/index-db-controller.js

@ -52,16 +52,7 @@ module.exports = class IndexDbController extends EventEmitter {
.then((dataObject)=> {
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