Skip to content

Commit

Permalink
Fix window title displaying null while loading a video or channel (#4913
Browse files Browse the repository at this point in the history
)
  • Loading branch information
absidue authored Apr 9, 2024
1 parent 97926d8 commit ae027f1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/renderer/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,13 @@ export default defineComponent({
return this.$store.getters.getShowCreatePlaylistPrompt
},
windowTitle: function () {
const routeName = this.$route.name
if (routeName !== 'channel' && routeName !== 'watch' && routeName !== 'hashtag') {
let title =
this.$route.meta.path === '/home'
? packageDetails.productName
: `${translateWindowTitle(this.$route.meta.title, this.$i18n)} - ${packageDetails.productName}`
const routePath = this.$route.path
if (!routePath.startsWith('/channel/') && !routePath.startsWith('/watch/') && !routePath.startsWith('/hashtag/')) {
let title = translateWindowTitle(this.$route.meta.title, this.$i18n)
if (!title) {
title = packageDetails.productName
} else {
title = `${title} - ${packageDetails.productName}`
}
return title
} else {
Expand Down

0 comments on commit ae027f1

Please sign in to comment.