From e86c5ea1fa7dcbae582707430a821d2197576f7b Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Tue, 28 Jul 2020 09:40:04 +0300 Subject: fix non-timeline routes breaking current/previous timeline --- src/components/timeline_menu/timeline_menu.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/components/timeline_menu') diff --git a/src/components/timeline_menu/timeline_menu.js b/src/components/timeline_menu/timeline_menu.js index 0afeb8b4..fcc7b4ef 100644 --- a/src/components/timeline_menu/timeline_menu.js +++ b/src/components/timeline_menu/timeline_menu.js @@ -26,7 +26,9 @@ const TimelineMenu = { if (this.currentUser && this.currentUser.locked) { this.$store.dispatch('startFetchingFollowRequests') } - this.$store.dispatch('setLastTimeline', this.$route.name) + if (timelineNames().includes(this.$route.name)) { + this.$store.dispatch('setLastTimeline', this.$route.name) + } }, methods: { openMenu () { -- cgit v1.2.3-70-g09d2