Obviously tagObjects
is an array and has a length of 0
. However it's still getting past that check and causes an error.
TypeError: Cannot read property 'length' of undefined
if (tagObjects != "empty" || tagObjects.length === 0) {
for (var i = 0; i < tagObjects.tags.length; i++) {
temp_tags.push(tagObjects[i].tags);
}
temp_tags.forEach(function(obj) {
if (obj.selected) {
if (vs.tags[map[obj.term]] != undefined) {
vs.tags[map[obj.term]].selected = true;
}
}
});
}
It's even getting past the string check!
Aucun commentaire:
Enregistrer un commentaire