comply with tests

This commit is contained in:
Daniel Grijalva 2019-05-08 13:57:47 -07:00
parent 87c3f4619e
commit 07bf1b4653

View File

@ -98,13 +98,13 @@ export default {
setTimeout(() => { setTimeout(() => {
this.success = false this.success = false
this.$emit('close') this.$emit('close')
if (this.$router.history.current.name === 'post-id-slug'){ if (this.$router.history.current.name === 'post-id-slug') {
// redirect to index // redirect to index
this.$router.history.push('/') this.$router.history.push('/')
} else { } else {
// reload the page (when deleting from profile or index) // reload the page (when deleting from profile or index)
this.$router.history.go() window.location.assign(window.location.href)
} }
}, 500) }, 500)
}, 1500) }, 1500)
} catch (err) { } catch (err) {