From c15b6e0fd3cdb7c53660bdbe58a31c8fa98f9a1a Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Wed, 10 Apr 2024 22:48:25 -0400 Subject: [PATCH] Allow abstract parent class lookup by classname for isSubType. --- client/src/components/Datatypes/model.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/components/Datatypes/model.ts b/client/src/components/Datatypes/model.ts index 45334ba8d255..28e55257daa7 100644 --- a/client/src/components/Datatypes/model.ts +++ b/client/src/components/Datatypes/model.ts @@ -17,7 +17,8 @@ export class DatatypesMapperModel { isSubType(child: string, parent: string): boolean { const mapping = this.datatypesMapping; const childClassName = mapping.ext_to_class_name[child]; - const parentClassName = mapping.ext_to_class_name[parent]; + const parentClassName = mapping.ext_to_class_name[parent] || parent; + if (!childClassName || !parentClassName) { return false; }