Fix error when plugin is added
This commit is contained in:
parent
b6ab3bbc19
commit
0443cca321
|
@ -34,8 +34,7 @@ export function createPluginsStore() {
|
|||
}
|
||||
|
||||
let res = await API.createPlugin(pluginData)
|
||||
|
||||
let newPlugin = res.plugins[0]
|
||||
let newPlugin = res.plugin
|
||||
update(state => {
|
||||
const currentIdx = state.findIndex(plugin => plugin._id === newPlugin._id)
|
||||
if (currentIdx >= 0) {
|
||||
|
|
Loading…
Reference in New Issue