|
@@ -132,13 +132,15 @@ export class TweetBodyComponent {
|
|
|
el =>
|
|
|
el.screen_name.toLowerCase() === element["screenName"].toLowerCase()
|
|
|
)[0];
|
|
|
- res.push({
|
|
|
- start: element.indices[0],
|
|
|
- stop: element.indices[1],
|
|
|
- type: "user_mention",
|
|
|
- text: "@" + element["screenName"],
|
|
|
- userId: apiEntity["id_str"] || ""
|
|
|
- });
|
|
|
+ if (apiEntity) {
|
|
|
+ res.push({
|
|
|
+ start: element.indices[0],
|
|
|
+ stop: element.indices[1],
|
|
|
+ type: "user_mention",
|
|
|
+ text: "@" + element["screenName"],
|
|
|
+ userId: apiEntity["id_str"]
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
return res;
|
|
|
}
|