At.js
At.js copied to clipboard
Undefined on line 824
data = $li.data('item-data'); on that line error appear sometimes, when u just start typing but stay just on "#" with no other text.
"Uncaught TypeError: Cannot read property 'data' of undefined"
Thank you!!!
It was from example, callback function:
$('#editable').atwho({
at: "#",
data: tags,
limit: 200,
callbacks: {
afterMatchFailed: function(at, el) {
// 32 is spacebar
if (at == '#') {
tags.push(el.text().trim().slice(1));
this.model.save(tags);
this.insert(el.text().trim());
return false;
}
}
}
});
...without it its ok.