Skip to content

Commit 94d82cf

Browse files
dhvanipafrolic
andauthored
fix(world): namespaceLabel should be compared to namespaceLabel not namespace (#3515)
Co-authored-by: Kevin Ingersoll <kingersoll@gmail.com>
1 parent 6e19b86 commit 94d82cf

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.changeset/beige-pears-exercise.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@latticexyz/world": patch
3+
---
4+
5+
Fixed an issue in system resolving helper used by CLI was not correctly comparing `namespaceLabel`s.

packages/world/ts/node/resolveSystems.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ export async function resolveSystems({
2020
// validate every system in config refers to an existing system contract
2121
const configSystems = Object.values(config.namespaces).flatMap((namespace) => Object.values(namespace.systems));
2222
const missingSystems = configSystems.filter(
23-
(system) => !systemContracts.some((s) => s.namespaceLabel === system.namespace && s.systemLabel === system.label),
23+
(system) =>
24+
!systemContracts.some((s) => s.namespaceLabel === system.namespaceLabel && s.systemLabel === system.label),
2425
);
2526
if (missingSystems.length > 0) {
2627
throw new Error(

0 commit comments

Comments
 (0)