Fix core profiler extensions page from selecting activated plugins (#52029)
* Add check to disallow selecting activated plugins * Changelog
This commit is contained in:
parent
63fdf72645
commit
e49009b9a9
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Core profiler remove selecting activated plugins in extensions page
|
|
@ -62,6 +62,10 @@ export const Plugins = ( {
|
|||
);
|
||||
|
||||
const setSelectedPlugin = ( plugin: Extension ) => {
|
||||
// Don't allow selecting a plugin that is already activated.
|
||||
if ( plugin.is_activated ) {
|
||||
return;
|
||||
}
|
||||
setSelectedPlugins(
|
||||
selectedPlugins.some( ( item ) => item.key === plugin.key )
|
||||
? selectedPlugins.filter( ( item ) => item.key !== plugin.key )
|
||||
|
|
Loading…
Reference in New Issue