Extensions: Simplify the configure() function (#64958)
refactor: stop passing the extension to the `configure()` function
This commit is contained in:
@@ -20,9 +20,12 @@ export function getPluginExtensions<T extends object = {}>(
|
||||
|
||||
const extensions = configureFuncs.reduce<PluginExtension[]>((result, configure) => {
|
||||
const extension = configure(context);
|
||||
|
||||
// If the configure() function returns `undefined`, the extension is not displayed
|
||||
if (extension) {
|
||||
result.push(extension);
|
||||
}
|
||||
|
||||
return result;
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user