mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-08-07 15:09:21 +02:00
fix: #10528, gray out disabled nav items
use enabled property if present change default to true, so added nav items are enabled by default
This commit is contained in:
@@ -92,7 +92,13 @@ async function getAvailable() {
|
||||
return item;
|
||||
});
|
||||
|
||||
return await plugins.hooks.fire('filter:navigation.available', core);
|
||||
const navItems = await plugins.hooks.fire('filter:navigation.available', core);
|
||||
navItems.forEach((item) => {
|
||||
if (item && !item.hasOwnProperty('enabled')) {
|
||||
item.enabled = true;
|
||||
}
|
||||
});
|
||||
return navItems;
|
||||
}
|
||||
|
||||
require('../promisify')(admin);
|
||||
|
||||
Reference in New Issue
Block a user