From 97db7767647dde14d6cedb3a62fb702f5d64e126 Mon Sep 17 00:00:00 2001 From: Maxime Bonvin Date: Sat, 6 Jun 2020 12:59:20 +0200 Subject: [PATCH] await for the router replace --- src/pages/playlists/local/PlaylistsLocalUnit.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/playlists/local/PlaylistsLocalUnit.vue b/src/pages/playlists/local/PlaylistsLocalUnit.vue index f20829dd..5da81ccc 100644 --- a/src/pages/playlists/local/PlaylistsLocalUnit.vue +++ b/src/pages/playlists/local/PlaylistsLocalUnit.vue @@ -41,7 +41,7 @@ export default Vue.extend({ playlists: get("playlist/playlists"), }, watch: { - playlists() { + async playlists() { if (!this.playlist?.path) return; const hash = PlaylistLibrary.GetByPath(this.playlist.path)?.hash; @@ -49,16 +49,16 @@ export default Vue.extend({ if (!hash) return; if (hash === this.$route.params.hash) return; - this.$router.replace({ + await this.$router.replace({ name: route.PLAYLISTS_LOCAL_UNIT, params: { hash }, }); }, - playlist() { + async playlist() { if (!this.playlist || !this.playlist.hash) return; if (this.playlist.hash === this.$route.params.hash) return; - this.$router.replace({ + await this.$router.replace({ name: route.PLAYLISTS_LOCAL_UNIT, params: { hash: this.playlist.hash }, });