var message = text[i] == null ? 'no results' : text[i]; ^ TypeError: Cannot read property '7' of null Maybe this is because of regex. Need to modify regex. ` var text = item.errorMsg.match(/">([^"]*)<\/a>/);`
var message = text[i] == null ? 'no results' : text[i];
^
TypeError: Cannot read property '7' of null
Maybe this is because of regex. Need to modify regex.
var text = item.errorMsg.match(/">([^"]*)<\/a>/);