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:
parent
2c63ea707e
commit
9b448913fa
1 changed files with 1 additions and 0 deletions
|
@ -67,6 +67,7 @@ export default {
|
||||||
filters: {
|
filters: {
|
||||||
truncate: (text, length, suffix) => {
|
truncate: (text, length, suffix) => {
|
||||||
if (!text) return text
|
if (!text) return text
|
||||||
|
if (text.length <= length) return text
|
||||||
return text.substring(0, length) + suffix;
|
return text.substring(0, length) + suffix;
|
||||||
},
|
},
|
||||||
stripHTML: text => {
|
stripHTML: text => {
|
||||||
|
|
Loading…
Reference in a new issue