fix production build issues

This commit is contained in:
Chris Sexton 2019-11-08 00:35:20 -05:00
parent b67a1cccd5
commit e9360e5082
5 changed files with 4 additions and 11 deletions

View File

@ -51,7 +51,7 @@
methods: { methods: {
newFile: function() { newFile: function() {
this.$store.dispatch('newFile') this.$store.dispatch('newFile')
.catch(err => console.log(err)) .catch(() => {})
.then(file => { .then(file => {
this.$store.dispatch('updateSearch') this.$store.dispatch('updateSearch')
this.$router.push({ name: 'console-slug', params: { slug: file.Slug }}) this.$router.push({ name: 'console-slug', params: { slug: file.Slug }})

View File

@ -78,9 +78,7 @@
if (res.data.Slug != this.$route.params.slug) if (res.data.Slug != this.$route.params.slug)
this.$router.replace({params: { slug: res.data.Slug }}) this.$router.replace({params: { slug: res.data.Slug }})
}) })
.catch(err => { .catch(() => { })
console.log('err:' + err)
})
} }
}, },
components: {TagList, Editor} components: {TagList, Editor}

View File

@ -8,7 +8,7 @@
</b-row> </b-row>
<b-row> <b-row>
<b-col cols="10"> <b-col cols="10">
<label for="tagList" >Tags</label> <label for="tagList" :hidden="!tags">Tags</label>
</b-col> </b-col>
</b-row> </b-row>
<b-row> <b-row>

View File

@ -37,7 +37,6 @@
}, },
computed: { computed: {
results: function() { results: function() {
console.log("results:"+this.$store.state.searchResults)
return this.$store.state.searchResults return this.$store.state.searchResults
} }
}, },

View File

@ -73,7 +73,6 @@ export default new Vuex.Store({
updateSearch: function ({commit, state}) { updateSearch: function ({commit, state}) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let query = state.query || "" let query = state.query || ""
console.log("running search for: " + query)
axios.get('/v1/entries?query='+query) axios.get('/v1/entries?query='+query)
.catch(err => { .catch(err => {
state.addError(err) state.addError(err)
@ -86,7 +85,6 @@ export default new Vuex.Store({
}) })
}, },
saveFile: function({state}) { saveFile: function({state}) {
console.log(state.file)
if (state.file) if (state.file)
return axios.put('/v1/entries/'+state.file.Slug, state.file) return axios.put('/v1/entries/'+state.file.Slug, state.file)
}, },
@ -94,11 +92,9 @@ export default new Vuex.Store({
axios.delete('/v1/entries/'+slug) axios.delete('/v1/entries/'+slug)
.catch(err => { .catch(err => {
commit('addError', err) commit('addError', err)
console.log(err)
}) })
.then(res => { .then(() => {
dispatch('updateSearch') dispatch('updateSearch')
console.log(res.status, res.statusText)
}) })
} }
}, },