mirror of
https://github.com/strapi/strapi.git
synced 2025-08-11 10:18:28 +00:00
Prevent plugin with no mainComponent from being injected into the left menu
Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
parent
940b1ebec5
commit
b94d1a6a08
@ -68,7 +68,13 @@ function LeftMenuLinkContainer({ plugins, ...rest }) {
|
|||||||
// Check if the plugins list is empty or not and display plugins by name
|
// Check if the plugins list is empty or not and display plugins by name
|
||||||
const pluginsLinks = !isEmpty(plugins) ? (
|
const pluginsLinks = !isEmpty(plugins) ? (
|
||||||
map(sortBy(plugins, 'name'), plugin => {
|
map(sortBy(plugins, 'name'), plugin => {
|
||||||
if (plugin.id !== 'email' && plugin.id !== 'content-manager') {
|
const shouldInjectPlugin = plugin.mainComponent !== null;
|
||||||
|
|
||||||
|
if (
|
||||||
|
plugin.id !== 'email' &&
|
||||||
|
plugin.id !== 'content-manager' &&
|
||||||
|
shouldInjectPlugin
|
||||||
|
) {
|
||||||
const pluginSuffixUrl = plugin.suffixUrl
|
const pluginSuffixUrl = plugin.suffixUrl
|
||||||
? plugin.suffixUrl(plugins)
|
? plugin.suffixUrl(plugins)
|
||||||
: '';
|
: '';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user