small truncateFix

This commit is contained in:
Ruben Fiszel
2022-08-08 15:13:51 +02:00
parent 6b4ff7d882
commit a46de36e9b
2 changed files with 6 additions and 1 deletions
+3
View File
@@ -266,6 +266,9 @@ export function truncate(s: string, n: number, suffix: string = '...'): string {
}
export function truncateRev(s: string, n: number, prefix: string = '...'): string {
if (!s) {
return prefix
}
if (s.length <= n) {
return s
} else {
+3 -1
View File
@@ -15,7 +15,9 @@ const config = {
'1/4': '25%',
'1/3': '33%',
'1/2': '50%',
'2/3': '66%'
'2/3': '66%',
'3/4': '75%'
},
minHeight: {
'1/2': '50vh'