Skip to content

Commit

Permalink
Change special casing of undefined namespace to also include Core nam…
Browse files Browse the repository at this point in the history
…espace
  • Loading branch information
bryantpark04 committed Jul 23, 2024
1 parent d8edf10 commit 69cdca3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/platform-sdk-generator/src/model/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,10 @@ export class Model {
}

#addComponent(c: ir.Component) {
const ns = this.#namespaces.get(c.namespace ?? "");
const nsName = (c.namespace === undefined || c.namespace === "Core")
? ""
: c.namespace;
const ns = this.#namespaces.get(nsName);
if (!ns) {
throw new Error(`Namespace not found for ${c.namespace} in ${c.name}`);
}
Expand Down

0 comments on commit 69cdca3

Please sign in to comment.