From 13fdd63efb6f6e737a5a18efbf435625db632fdd Mon Sep 17 00:00:00 2001 From: Cyrille Bollu Date: Mon, 14 Oct 2019 15:16:00 +0200 Subject: FIX: In single post timeline, do not load TimelineList component when there are no answers. Signed-off-by: Cyrille Bollu --- src/views/TimelineSinglePost.vue | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/views/TimelineSinglePost.vue b/src/views/TimelineSinglePost.vue index b02d3113..e14f77d5 100644 --- a/src/views/TimelineSinglePost.vue +++ b/src/views/TimelineSinglePost.vue @@ -2,7 +2,7 @@ @@ -45,9 +45,23 @@ export default { } }, computed: { - // Extract the viewed account name from the URL + /** + * Extract the viewed account name from the URL + * + * @returns {String} + * + */ account() { return window.location.href.split('/')[window.location.href.split('/').length - 2].substr(1) + }, + /** + * Returns the timeline currently loaded in the store + * + * @returns {Object} + * + */ + timeline: function() { + return this.$store.getters.getTimeline } }, beforeMount: function() { -- cgit v1.2.3