I'm getting the following error:
Unexpected token else You may need an appropriate loader to handle this file type.
if (action === 'category-update-only') {
for (var i=0; i<vm.terms.length; i++)
if (oldTerm.term === vm.terms[i].term) {
vm.terms[i].tag = newTerm.tag;
}
}
}
else if (action === 'term-updated') {
// Add new term:
vm.terms.unshift(newTerm);
// Find and remove oldTerm:
for (var i=0; i<vm.terms.length; i++)
if (oldTerm.term === vm.terms[i].term) {
vm.terms.splice(i, 1);
}
}
}
It's saying I have an error on this line: else if (action === 'term-updated') {
However this is a perfectly value else
statement.
Aucun commentaire:
Enregistrer un commentaire