use truncate instead of substring

This commit is contained in:
Ulf Gebhardt 2019-04-19 11:52:01 +02:00
parent d986e086c4
commit 55c1ac276d
No known key found for this signature in database
GPG Key ID: 44C888923CC8E7F3

View File

@ -6,7 +6,7 @@ export default {
return this.$t('profile.userAnonym')
}
// Return full Username or truncated Username
return maxLength ? userName.substring(0, maxLength) : userName
return maxLength ? this.$filters.truncate(userName, maxLength) : userName
}
}
}