Skip to content

Commit 335467a

Browse files
committed
fix bug: lack case
1 parent 64e8b13 commit 335467a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-truncate-filter",
3-
"version": "1.1.4",
3+
"version": "1.1.5",
44
"description": "A filter for VueJs to truncate string",
55
"main": "vue-truncate.js",
66
"repository": {

vue-truncate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
clamp = clamp || '...';
1717
length = length || 30;
1818

19-
if (text.length < length) return text;
19+
if (text.length <= length) return text;
2020

2121
var tcText = text.slice(0, length - clamp.length);
2222
var last = tcText.length - 1;

0 commit comments

Comments
 (0)