Skip to content

Commit bfa22f4

Browse files
authored
! Fix license data reading code causing some videos cannot be played (#6682)
1 parent ec02f1f commit bfa22f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/renderer/views/Watch/Watch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ export default defineComponent({
413413
// extract localised title first and fall back to the not localised one
414414
this.videoTitle = result.primary_info?.title.text ?? result.basic_info.title
415415
this.videoViewCount = result.basic_info.view_count ?? (result.primary_info.view_count ? extractNumberFromString(result.primary_info.view_count.text) : null)
416-
this.license = result.secondary_info.metadata.rows.find(element => element.title.text === 'License')?.contents[0].text
416+
this.license = result.secondary_info.metadata.rows.find(element => element.title?.text === 'License')?.contents[0]?.text
417417

418418
this.channelId = result.basic_info.channel_id ?? result.secondary_info.owner?.author.id
419419
this.channelName = result.basic_info.author ?? result.secondary_info.owner?.author.name

0 commit comments

Comments
 (0)