Skip to content

Commit

Permalink
Merge pull request #228 from betwixt-labs/rpc-fix-ts
Browse files Browse the repository at this point in the history
Rpc fix ts
  • Loading branch information
Andrew authored Apr 28, 2023
2 parents e212f02 + c9d3078 commit 79fcbdd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION="2.5.2"
VERSION="2.5.3"
MAJOR=2
MINOR=5
PATCH=2
PATCH=3
3 changes: 2 additions & 1 deletion Core/Generators/TypeScript/TypeScriptGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,9 @@ public override string Compile(Version? languageVersion, XrpcServices services =
builder.AppendLine("const service = Reflect.construct(constructor, [undefined]);");
builder.CodeBlock("if (XrpcServiceRegistry.staticServiceInstances.has(serviceName))", indentStep, () =>
{
builder.AppendLine("throw new Error(`Duplicate service registered: ${name}`);");
builder.AppendLine("throw new Error(`Duplicate service registered: ${serviceName}`);");
});
builder.AppendLine("XrpcServiceRegistry.staticServiceInstances.set(serviceName, service);");
});

});
Expand Down

0 comments on commit 79fcbdd

Please sign in to comment.