Closed AayushGour closed 2 years ago
@AayushGour 🤔 the code you've provided
let searchData = await YouTube.search(searchParam, { limit: 10, type: "playlist" })
isnt actually helping me reproduce this issue. Could you provide your full code snippet if possible? The Youtube.search
would not call Playlist.toJSON
, it would instead return the Playlist
class. Is there anything else in your code such as json stringifying the searchData
?
this.thumbnail.toJSON
seems to be a case of missing thumbnail data, I will look into it 👍
https://github.com/DevAndromeda/youtube-sr/commit/79e0dd15d02024ca530c86bb98d8ffd63cf5882f should fix the issue related to TypeError: this.thumbnail.toJSON is not a function at Playlist.toJSON (node_modules\youtube-sr\dist\mod.js:266:33)
When I try to search with a particular word and the type is set to "playlist" then I'm facing the following Issue.
TypeError: this.thumbnail.toJSON is not a function at Playlist.toJSON (node_modules\youtube-sr\dist\mod.js:266:33)
Here is my Code...
let searchData = await YouTube.search(searchParam, { limit: 10, type: "playlist" })