fix tests, add performance test (skipped, doesn't assert anything),

tweak max mentions count
This commit is contained in:
Henry Jameson 2021-08-12 19:37:04 +03:00
parent 2182af4058
commit add5921b8b
4 changed files with 72 additions and 60 deletions

View file

@ -41,7 +41,7 @@ const MentionLink = {
},
computed: {
user () {
return this.url && this.$store.getters.findUserByUrl(this.url)
return this.url && this.$store && this.$store.getters.findUserByUrl(this.url)
},
isYou () {
// FIXME why user !== currentUser???

View file

@ -15,7 +15,7 @@ const MentionsLine = {
},
computed: {
limit () {
return 2
return 5
},
mentionsComputed () {
return this.mentions.slice(0, this.limit)

View file

@ -159,7 +159,7 @@ export default Vue.component('RichContent', {
return item // We'll handle it later
}
case 'span':
if (attrs['class'].includes('h-card')) {
if (this.handleLinks && attrs['class'] && attrs['class'].includes('h-card')) {
return ['', children.map(processItem), '']
}
}