Skip to content

Commit

Permalink
fix(admin-ui): resolve all bugs displayed for admin-ui bug #308
Browse files Browse the repository at this point in the history
  • Loading branch information
syntrydy committed Nov 25, 2021
1 parent 3241bc9 commit 45e4186
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions plugins/PluginReducersResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ import reducerRegistry from '../app/redux/reducers/ReducerRegistry'
async function process() {
const metadataFilePath = plugins.map((item) => item.metadataFile)
let pluginReducers = []
metadataFilePath.forEach(async (path) => {
pluginReducers = [...pluginReducers, ...require(`${path}`).default.reducers]
await metadataFilePath.forEach(async (path) => {
pluginReducers = await [
...pluginReducers,
...require(`${path}`).default.reducers,
]

pluginReducers.forEach(async (element) => {
reducerRegistry.register(element.name, element.reducer)
await reducerRegistry.register(element.name, element.reducer)
})
})
}
Expand Down

0 comments on commit 45e4186

Please sign in to comment.