From c2356bdd768df8e2efa602621058b4d6ce4eff8e Mon Sep 17 00:00:00 2001 From: benStre Date: Thu, 18 Jan 2024 21:17:36 +0100 Subject: [PATCH] fix class name --- js_adapter/js_class_adapter.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js_adapter/js_class_adapter.ts b/js_adapter/js_class_adapter.ts index ea509f34..c1a520d2 100644 --- a/js_adapter/js_class_adapter.ts +++ b/js_adapter/js_class_adapter.ts @@ -387,8 +387,8 @@ export class Decorators { if (typeof params[0] == "string" || params[0] instanceof Type) { type = normalizeType(params[0], false, "ext"); } - else if (original_class[METADATA]?.[Decorators.FORCE_TYPE]?.constructor) type = original_class[METADATA]?.[Decorators.FORCE_TYPE]?.constructor.replace(/^_/, '') // remove leading _ from type name - else type = Type.get("ext", original_class.name); + else if (original_class[METADATA]?.[Decorators.FORCE_TYPE]?.constructor) type = original_class[METADATA]?.[Decorators.FORCE_TYPE]?.constructor + else type = Type.get("ext", original_class.name.replace(/^_/, '')); // remove leading _ from type name // return new templated class @@ -419,8 +419,8 @@ export class Decorators { if (typeof params[0] == "string" || params[0] instanceof Type) { type = normalizeType(params[0], false, "ext"); } - else if (original_class[METADATA]?.[Decorators.FORCE_TYPE]?.constructor) type = original_class[METADATA]?.[Decorators.FORCE_TYPE]?.constructor.replace(/^_/, '') // remove leading _ from type name - else type = Type.get("ext", original_class.name); + else if (original_class[METADATA]?.[Decorators.FORCE_TYPE]?.constructor) type = original_class[METADATA]?.[Decorators.FORCE_TYPE]?.constructor + else type = Type.get("ext", original_class.name.replace(/^_/, '')); // remove leading _ from type name let callerFile:string|undefined;