Cannot read property 'includes' of undefined

前端 未结 6 1384
抹茶落季
抹茶落季 2021-01-21 16:09

I am new to JavaScript, am I was trying to dissect an embedded message. Here\'s my code, it runs fine for a few mins, works accordingly but idk what goes wrong.



        
6条回答
  •  遇见更好的自我
    2021-01-21 16:26

    It means inside message.embeds[i] there is at least one element without title property.

    You should check first if message.embeds[i].title exists and perform other operations after the check.

提交回复
热议问题