Commit 9b73a86d authored by Adam Procter's avatar Adam Procter 💩

made sure history and clear is sync'd

parent 44948440
......@@ -40,10 +40,31 @@ const store = new Vuex.Store({
//if all good could do something
}
})
.catch(function(err) {})
.catch(function(err) {
console.log(err)
})
},
CLEAR_STATE() {
store.replaceState({ flavour: null })
var flavour = null
pouchdb
.get('myfav')
.then(function(doc) {
return pouchdb.put({
_id: 'myfav',
_rev: doc._rev,
flavour: flavour
})
})
.then(function(response) {
// handle response
if (response.ok == true) {
//if all good could do something
}
})
.catch(function(err) {
console.log(err)
})
}
},
actions: {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment