Parcourir la source

simplify getter (#1188)

Alex Swiontek il y a 7 ans
Parent
commit
a65d8c519f
1 fichiers modifiés avec 1 ajouts et 2 suppressions
  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(', ')
 }