Skip to content
Snippets Groups Projects
Commit 9dcaadfc authored by vaartis's avatar vaartis
Browse files

Use Vue.set to ensure that the updated pack property is reactive

If it was null, it wouldn't be reactive when editing
parent 9d9ac8b6
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !32. Comments created here will be created in the context of that merge request.
...@@ -2,6 +2,8 @@ import { listPacks, downloadFrom, reloadEmoji, deletePack, savePackMetadata } fr ...@@ -2,6 +2,8 @@ import { listPacks, downloadFrom, reloadEmoji, deletePack, savePackMetadata } fr
import { Message } from 'element-ui' import { Message } from 'element-ui'
import Vue from 'vue'
const packs = { const packs = {
state: { state: {
localPacks: {}, localPacks: {},
...@@ -16,7 +18,7 @@ const packs = { ...@@ -16,7 +18,7 @@ const packs = {
}, },
UPDATE_LOCAL_PACK_VAL: (state, { name, key, value }) => { UPDATE_LOCAL_PACK_VAL: (state, { name, key, value }) => {
state.localPacks[name]['pack'][key] = value Vue.set(state.localPacks[name]['pack'], key, value)
}, },
UPDATE_LOCAL_PACK: (state, { name, pack }) => { UPDATE_LOCAL_PACK: (state, { name, pack }) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment