Skip to content

Commit

Permalink
fix bug: lack case
Browse files Browse the repository at this point in the history
  • Loading branch information
imcvampire committed Nov 14, 2016
1 parent 64e8b13 commit 335467a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-truncate-filter",
"version": "1.1.4",
"version": "1.1.5",
"description": "A filter for VueJs to truncate string",
"main": "vue-truncate.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion vue-truncate.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
clamp = clamp || '...';
length = length || 30;

if (text.length < length) return text;
if (text.length <= length) return text;

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

0 comments on commit 335467a

Please sign in to comment.