Skip to content

Commit

Permalink
fix: have videoDetails.age_restricted always be a boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
fent committed Dec 3, 2020
1 parent 7f0ab71 commit 5073154
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/info.js
Expand Up @@ -69,7 +69,7 @@ exports.getBasicInfo = async(id, options) => {
media,
likes: extras.getLikes(info),
dislikes: extras.getDislikes(info),
age_restricted: media && media.notice_url && AGE_RESTRICTED_URLS.some(url => media.notice_url.includes(url)),
age_restricted: !!(media && media.notice_url && AGE_RESTRICTED_URLS.some(url => media.notice_url.includes(url))),

// Give the standard link to the video.
video_url: VIDEO_URL + id,
Expand Down

0 comments on commit 5073154

Please sign in to comment.