浏览代码

simplify getter (#1188)

Alex Swiontek 7 年之前
父节点
当前提交
a65d8c519f
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      examples/counter-hot/store/getters.js

+ 1 - 2
examples/counter-hot/store/getters.js

@@ -7,6 +7,5 @@ export const recentHistory = state => {
   const begin = end - limit < 0 ? 0 : end - limit
   return state.history
     .slice(begin, end)
-    .toString()
-    .replace(/,/g, ', ')
+    .join(', ')
 }