Skip to content

Commit 1e68e1f

Browse files
ludijluka-nextcloud
authored andcommitted
feature(3331): use existingIndex to define existingCard
Signed-off-by: Luutzen Dijkstra <[email protected]>
1 parent a136196 commit 1e68e1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/store/card.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export default {
189189
card.assignedUsers = card.assignedUsers || []
190190
const existingIndex = state.cards.findIndex(_card => _card.id === card.id)
191191
if (existingIndex !== -1) {
192-
const existingCard = state.cards.find(_card => _card.id === card.id)
192+
const existingCard = state.cards[existingIndex]
193193
Vue.set(state.cards, existingIndex, Object.assign({}, existingCard, card))
194194
} else {
195195
state.cards.push(card)

0 commit comments

Comments
 (0)