Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

TypeError: Cannot read properties of undefined (reading 'alerts') #70

Closed
mbg206 opened this issue Apr 8, 2022 · 1 comment · Fixed by #71
Closed

TypeError: Cannot read properties of undefined (reading 'alerts') #70

mbg206 opened this issue Apr 8, 2022 · 1 comment · Fixed by #71

Comments

@mbg206
Copy link

mbg206 commented Apr 8, 2022

Everytime I call getChannelVideos (let res = await ytch.getChannelVideos({channelId: channelId}); where channelId is 'UCBy0RRHpgTyA7Vx0o5HpfLg') the following is thrown:

/home/runner/myApp/node_modules/yt-channel-info/app/helper.js:58
    if (typeof (response.data.response.alerts) !== 'undefined') {
                                       ^

TypeError: Cannot read properties of undefined (reading 'alerts')
    at YoutubeGrabberHelper.parseChannelVideoResponse (/home/runner/myApp/node_modules/yt-channel-info/app/helper.js:58:40)
    at Function.getChannelVideosNewest (/home/runner/myApp/node_modules/yt-channel-info/app/fetchers/channel.js:11:29)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Function.getChannelVideos (/home/runner/myApp/node_modules/yt-channel-info/app/youtube-grabber.js:212:14)
    at async getChannelVideos (/home/runner/myApp/src/youtube.js:9:15)

It seems that this is an issue with yt-channel-info, not my code (i think)

@ChunkyProgrammer
Copy link
Member

I'll post a fix later today

ChunkyProgrammer added a commit to ChunkyProgrammer/yt-channel-info that referenced this issue Apr 8, 2022
PrestonN pushed a commit that referenced this issue Apr 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants