FIX: Show knowledge explorer link only when plugin enabled

This commit is contained in:
Justin DiRose 2019-10-04 11:09:31 -05:00
parent 274e0134cc
commit 1257f133e4
1 changed files with 7 additions and 4 deletions

View File

@ -5,10 +5,13 @@ export default {
initialize() {
withPluginApi("0.8", api => {
api.decorateWidget("hamburger-menu:generalLinks", () => {
return {
route: "knowledgeExplorer",
label: "knowledge_explorer.title"
};
const siteSettings = api.container.lookup("site-settings:main");
if (siteSettings.knowledge_explorer_enabled) {
return {
route: "knowledgeExplorer",
label: "knowledge_explorer.title"
};
}
});
});
}