Skip to content

Commit 4b92989

Browse files
ludijluka-nextcloud
authored andcommitted
feature(3331): use existingIndex to define existingCard
Signed-off-by: Luutzen Dijkstra <luutzen.dijkstra@gmail.com>
1 parent fedf189 commit 4b92989

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)