Merge pull request #7883 from Budibase/fix/plugin-upload-error
Fix for error when adding a plugin
This commit is contained in:
commit
63596eddd2
|
@ -34,8 +34,7 @@ export function createPluginsStore() {
|
||||||
}
|
}
|
||||||
|
|
||||||
let res = await API.createPlugin(pluginData)
|
let res = await API.createPlugin(pluginData)
|
||||||
|
let newPlugin = res.plugin
|
||||||
let newPlugin = res.plugins[0]
|
|
||||||
update(state => {
|
update(state => {
|
||||||
const currentIdx = state.findIndex(plugin => plugin._id === newPlugin._id)
|
const currentIdx = state.findIndex(plugin => plugin._id === newPlugin._id)
|
||||||
if (currentIdx >= 0) {
|
if (currentIdx >= 0) {
|
||||||
|
|
Loading…
Reference in New Issue