diff --git a/src/components/modal/AlbumCreateModal.vue b/src/components/modal/AlbumCreateModal.vue index 83d6b041..2632b287 100644 --- a/src/components/modal/AlbumCreateModal.vue +++ b/src/components/modal/AlbumCreateModal.vue @@ -66,7 +66,13 @@ export default defineComponent({ if (!this.album || album.basename !== this.album.basename) { const user = album.filename.split('/')[2]; const name = album.basename; - this.$router.push({ name: 'albums', params: { user, name } }); + const route = { name: 'albums', params: { user, name } }; + + if (!this.album) { + this.$router.push(route); + } else { + this.$router.replace(route); + } } this.close(); }, diff --git a/src/components/modal/FaceEditModal.vue b/src/components/modal/FaceEditModal.vue index a1c687af..0e0bb49f 100644 --- a/src/components/modal/FaceEditModal.vue +++ b/src/components/modal/FaceEditModal.vue @@ -93,7 +93,7 @@ export default defineComponent({ } else { await dav.faceRecognitionRenamePerson(this.oldName, this.name); } - this.$router.push({ + this.$router.replace({ name: this.$route.name as string, params: { user: this.user, name: this.name }, });