Explorar el Código

simplify getter (#1188)

Alex Swiontek hace 7 años
padre
commit
a65d8c519f
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  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(', ')
 }