Post Card: omit ellipses if description is short enough already

If the text is below the maximum length, just show the whole thing
without adding a "..." at the end
This commit is contained in:
Hippo 2019-12-24 13:51:38 +05:30
parent 2c63ea707e
commit 9b448913fa

View file

@ -67,6 +67,7 @@ export default {
filters: {
truncate: (text, length, suffix) => {
if (!text) return text
if (text.length <= length) return text
return text.substring(0, length) + suffix;
},
stripHTML: text => {