浏览代码

Fix bug where length was not correctly calculated on string

sbkwgh 8 年之前
父节点
当前提交
f1c325b3ca
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/main.js

+ 1 - 1
src/main.js

@@ -82,7 +82,7 @@ Vue.filter('stripTags', function (value) {
 });
 
 Vue.filter('truncate', function (value, length) {
-	if(value <= length) {
+	if(value.length <= length) {
 		return value
 	} else {
 		return value.slice(0, length) + '...'