diff --git a/packages/core/src/plugin.ts b/packages/core/src/plugin.ts index 6b521e8807e..4a0bfd8947e 100644 --- a/packages/core/src/plugin.ts +++ b/packages/core/src/plugin.ts @@ -91,16 +91,11 @@ const layer = Layer.effect( yield* lock.withPermit( Effect.gen(function* () { - const next = definitions.map((definition) => ({ id: definition.id, version: definition.version })) - const current = Array.from(active.values(), (entry) => ({ - id: entry.plugin.id, - version: entry.plugin.version, - })) if ( - current.length === next.length && - current.every((definition, index) => { - const candidate = next[index] - return definition.id === candidate?.id && definition.version === candidate.version + active.size === definitions.length && + Array.from(active.values()).every((entry, index) => { + const definition = definitions[index] + return entry.plugin.id === definition?.id && entry.plugin.version === definition.version }) ) { const nextInventory = [...Array.from(active.values(), (entry) => activeInfo(entry.plugin)), ...failures]