response[0]
is not defined, check if it is defined and then check for its property title.
(未定义response[0]
,检查是否已定义,然后检查其属性标题。)
if(typeof response[0] !== 'undefined' && typeof response[0].title !== 'undefined'){
//Do something
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…