Commit 197a2347 authored by Adam Procter's avatar Adam Procter
Browse files

updates for better adding nodes

half way there but still oddness on initial empty microcosm and number of items in nodes [] array 
parent e6ca2e9e
...@@ -77,7 +77,6 @@ export default { ...@@ -77,7 +77,6 @@ export default {
(nodes) => nodes.node_deleted == false (nodes) => nodes.node_deleted == false
) )
this.$store.dispatch('getMynodes') this.$store.dispatch('getMynodes')
this.myArray = nodesFiltered.reverse() this.myArray = nodesFiltered.reverse()
}, },
......
...@@ -54,7 +54,7 @@ export const mutations = { ...@@ -54,7 +54,7 @@ export const mutations = {
}) })
.catch(function (err) { .catch(function (err) {
// TODO: Does this situation ever hit 404 ? // TODO: Does this situation ever hit 404 ?
console.log(err) // console.log(err)
if (err.status == 404) { if (err.status == 404) {
var uniqueid = var uniqueid =
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15) +
...@@ -87,8 +87,8 @@ export const mutations = { ...@@ -87,8 +87,8 @@ export const mutations = {
state.myNodes = doc.nodes state.myNodes = doc.nodes
} }
}) })
.catch(function (err) { .catch(function () {
console.log(err) // console.log(err)
}) })
}, },
...@@ -132,8 +132,8 @@ export const actions = { ...@@ -132,8 +132,8 @@ export const actions = {
commit('ADD_NODE', e) commit('ADD_NODE', e)
}, },
getMynodes: ({ commit }, e) => { getMynodes: ({ commit }) => {
commit('GET_MY_NODES', e) commit('GET_MY_NODES')
}, },
editNode: ({ commit }, { nodeid, nodetext }) => { editNode: ({ commit }, { nodeid, nodetext }) => {
......
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