don't bother parsing mentions if there are not any.

resolves #46
This commit is contained in:
Morgan McMillian 2017-11-19 14:50:55 -08:00
parent 72c2bcf6c9
commit e6eb71003b

View file

@ -366,7 +366,7 @@ export class NewPostModal {
this.ptext = "" this.ptext = ""
} }
if (navParams.data.post.content.entities) { if (navParams.data.post.content.entities) {
if (navParams.data.post.content.entities.mentions) { if (navParams.data.post.content.entities.mentions.length > 0) {
this.ptext = this.ptext + this.parseMentions(navParams.data.post.content.entities.mentions); this.ptext = this.ptext + this.parseMentions(navParams.data.post.content.entities.mentions);
} }
} }