diff --git a/examples/counter-hot/store/getters.js b/examples/counter-hot/store/getters.js index c5f035ecf..712cdf29c 100644 --- a/examples/counter-hot/store/getters.js +++ b/examples/counter-hot/store/getters.js @@ -1,11 +1,7 @@ export const count = state => state.count -const limit = 5 - export const recentHistory = state => { - const end = state.history.length - const begin = end - limit < 0 ? 0 : end - limit return state.history - .slice(begin, end) + .slice(-5) .join(', ') }