Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
update viewlets config
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiggr committed Sep 13, 2022
1 parent a9d26a4 commit 146cdf4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export default function applyConfig(config) {
},
};

config.viewlets = config.viewlets || [];
config.addonReducers = { ...config.addonReducers, ...reducers };

// export const portlets = {
Expand Down
5 changes: 4 additions & 1 deletion src/localconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ function addViewlets(config) {
config.viewlets.push({ path: '/', component: ForestMetadata });
}
if (!config.viewlets) {
config.viewlets = [{ path: '/', component: ForestMetadata }];
config = {
...config,
viewlets: [{ path: '/', component: ForestMetadata }],
};
}
}

Expand Down

0 comments on commit 146cdf4

Please sign in to comment.