Skip to content

Commit

Permalink
clone object berore attaching indicators to prevent reactivity trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
fschade committed Jun 18, 2021
1 parent aabf395 commit 813cfd3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/web-app-files/src/store/mutations.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Vue from 'vue'
import pickBy from 'lodash-es/pickBy'
import moment from 'moment'
import { attachIndicators } from '../helpers/resources'
import cloneDeep from 'lodash-es/cloneDeep'

/**
* @param {Array.<Object>} shares array of shares
Expand Down Expand Up @@ -297,7 +298,7 @@ export default {
},

LOAD_INDICATORS(state) {
const files = [...state.files]
const files = cloneDeep(state.files)
files.forEach(resource => attachIndicators(resource, state.sharesTree))
state.files = files
},
Expand Down

0 comments on commit 813cfd3

Please sign in to comment.