From 07bf1b4653a264e9e1a32b3ac8ba47b986b50058 Mon Sep 17 00:00:00 2001 From: Daniel Grijalva Date: Wed, 8 May 2019 13:57:47 -0700 Subject: [PATCH] comply with tests --- webapp/components/Modal/DeleteModal.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/webapp/components/Modal/DeleteModal.vue b/webapp/components/Modal/DeleteModal.vue index 740d59317..0f9fc0d7b 100644 --- a/webapp/components/Modal/DeleteModal.vue +++ b/webapp/components/Modal/DeleteModal.vue @@ -98,13 +98,13 @@ export default { setTimeout(() => { this.success = false this.$emit('close') - if (this.$router.history.current.name === 'post-id-slug'){ - // redirect to index - this.$router.history.push('/') + if (this.$router.history.current.name === 'post-id-slug') { + // redirect to index + this.$router.history.push('/') } else { - // reload the page (when deleting from profile or index) - this.$router.history.go() - } + // reload the page (when deleting from profile or index) + window.location.assign(window.location.href) + } }, 500) }, 1500) } catch (err) {