We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3da722 commit b5b70faCopy full SHA for b5b70fa
1 file changed
packages/devtools/src/context/use-devtools-context.ts
@@ -44,15 +44,13 @@ export const usePlugins = () => {
44
})
45
46
const toggleActivePlugins = (pluginId: string) => {
47
- if (store.state.activePlugins.length === 3) return
48
-
49
setStore((prev) => {
50
const isActive = prev.state.activePlugins.includes(pluginId)
51
52
const updatedPlugins = isActive
53
? prev.state.activePlugins.filter((id) => id !== pluginId)
54
: [...prev.state.activePlugins, pluginId]
55
+ if (updatedPlugins.length > 3) return prev
56
return {
57
...prev,
58
state: {
0 commit comments