From 9ad7d6479c42587c58a4bf834f71f7e04a41501e Mon Sep 17 00:00:00 2001 From: ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com> Date: Thu, 2 Mar 2023 14:22:14 -0500 Subject: [PATCH] make review recommendations Co-Authored-By: absidue <48293849+absidue@users.noreply.github.com> --- .../components/ft-community-post/ft-community-post.js | 6 +----- src/renderer/views/Channel/Channel.js | 1 + src/renderer/views/Channel/Channel.vue | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/renderer/components/ft-community-post/ft-community-post.js b/src/renderer/components/ft-community-post/ft-community-post.js index 78ef2f70b4830..fcde36f1a2b4b 100644 --- a/src/renderer/components/ft-community-post/ft-community-post.js +++ b/src/renderer/components/ft-community-post/ft-community-post.js @@ -116,11 +116,7 @@ export default Vue.extend({ }, getBestQualityImage(imageArray) { - if (imageArray.length > 0) { - return imageArray[Math.max(0, imageArray.length - 1)].url - } else { - return '' - } + return imageArray.at(-1)?.url ?? '' } } }) diff --git a/src/renderer/views/Channel/Channel.js b/src/renderer/views/Channel/Channel.js index be3d8f2a2f8ce..b56e147941062 100644 --- a/src/renderer/views/Channel/Channel.js +++ b/src/renderer/views/Channel/Channel.js @@ -92,6 +92,7 @@ export default defineComponent({ tabInfoValues: [ 'videos', 'playlists', + 'community', 'about' ] } diff --git a/src/renderer/views/Channel/Channel.vue b/src/renderer/views/Channel/Channel.vue index 63ce50b94f5b0..9ac8380f04e71 100644 --- a/src/renderer/views/Channel/Channel.vue +++ b/src/renderer/views/Channel/Channel.vue @@ -321,7 +321,7 @@ :data="latestCommunityPosts" role="tabpanel" aria-labelledby="communityTab" - :display="'list'" + display="list" />