Przeglądaj źródła

Fix slug if it is changed in the url

sbkwgh 6 lat temu
rodzic
commit
00f9bcf710
1 zmienionych plików z 5 dodań i 1 usunięć
  1. 5 1
      frontend/src/store/modules/thread.js

+ 5 - 1
frontend/src/store/modules/thread.js

@@ -137,8 +137,12 @@ const actions = {
 				commit('setTotalPostsCount', res.data.postsCount)
 				commit('setPosts', res.data.Posts)
 
+				vue.$router.replace({ name: 'thread-post', params: {
+					post_number: postNumber || 0,
+					slug: res.data.slug 
+				}});
+
 				if(postNumber !== undefined) {
-					vue.$router.push({ name: 'thread-post', params: { post_number: postNumber } })
 					vue.highlightPost(+postNumber)
 				}
 			}).catch(e => {