diff --git a/src/redux/plugins/plugins.reducers.ts b/src/redux/plugins/plugins.reducers.ts index 6fa5bbf52332bf3b3ff5861261562fbe89d9a6e7..4ce46c2417cea0b4aed58c89b12648a865c70056 100644 --- a/src/redux/plugins/plugins.reducers.ts +++ b/src/redux/plugins/plugins.reducers.ts @@ -20,4 +20,11 @@ export const registerPluginReducer = (builder: ActionReducerMapBuilder<PluginsSt state.data[hash] = action.payload; } }); + builder.addCase(registerPlugin.rejected, (state, action) => { + if (action.payload) { + const { hash } = action.meta.arg; + + state.pluginsId = state.pluginsId.filter(pluginId => pluginId !== hash); + } + }); };