Skip to content

Commit 9dcd4d2

Browse files
committed
Bugfixes
1 parent ebf2105 commit 9dcd4d2

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

main-src/fetchYtStream.cjs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,16 @@ module.exports.searchYt = async (query) => {
9797
const plainResults = []
9898

9999
for (const result of innertubeResults.results) {
100-
if (result.type !== 'Video') {
100+
if (
101+
result.type !== 'Video' ||
102+
typeof result.video_id === 'undefined' ||
103+
typeof result.title === 'undefined' ||
104+
typeof result.title.text === 'undefined' ||
105+
typeof result.author === 'undefined' ||
106+
typeof result.author.name === 'undefined' ||
107+
typeof result.length_text === 'undefined' ||
108+
typeof result.length_text.text === 'undefined'
109+
) {
101110
continue
102111
}
103112

0 commit comments

Comments
 (0)