Skip to content

Commit 0a17e8a

Browse files
author
Guillaume Chau
committed
fix(vuex): performance issue when filtering history
1 parent 942c229 commit 0a17e8a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/devtools/views/vuex/VuexHistory.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,13 +260,11 @@ export default {
260260
]),
261261
262262
isActive (index, entry) {
263-
if (this.filter) return this.activeIndex === this.filteredHistory.indexOf(entry)
264-
return this.activeIndex === index - 1
263+
return this.activeIndex === index - (this.filter ? 0 : 1)
265264
},
266265
267266
isInspected (index, entry) {
268-
if (this.filter) return this.inspectedIndex === this.filteredHistory.indexOf(entry)
269-
return this.inspectedIndex === index - 1
267+
return this.inspectedIndex === index - (this.filter ? 0 : 1)
270268
},
271269
272270
toggleRecording () {

0 commit comments

Comments
 (0)