Skip to content

Commit

Permalink
fix 'cannot destructure name of undefined'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nurutomo committed May 15, 2021
1 parent 726ec6a commit fe3b924
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let handler = async (m, { conn, args }) => {
let json = await res.json()
if (!json.result) throw json
let { name, author, description, uploadDate, duration, url, isFamilyFriendly, genre, keywords, contentSize, videoQuality, commentCount } = json.result
let { name: authorname, url: authorlink } = author
let { name: authorname, url: authorlink } = author || {}
let dateConfig = {
hour: 'numeric',
minute: 'numeric',
Expand All @@ -30,7 +30,7 @@ Diposting pada ${new Date(uploadDate).toLocaleDateString('id', dateConfig)}
Size: ${contentSize || unknown}
Durasi: ${clockString(+ new Date(duration))}
Genre: ${genre || none}
Kualitas: ${quality ? quality : unknown}
Kualitas: ${videoQuality ? videoQuality : unknown}
${description}
Expand Down

0 comments on commit fe3b924

Please sign in to comment.