From b9566031dc3a047838c6dcec45c3b78e01e3b865 Mon Sep 17 00:00:00 2001 From: Dwight Van Lancker Date: Wed, 7 Feb 2024 16:06:35 +0100 Subject: [PATCH] Fix addScope function --- .../lib/interfaces/ConverterHandler.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/oslo-converter-uml-ea/lib/interfaces/ConverterHandler.ts b/packages/oslo-converter-uml-ea/lib/interfaces/ConverterHandler.ts index 9c14480..83001e9 100644 --- a/packages/oslo-converter-uml-ea/lib/interfaces/ConverterHandler.ts +++ b/packages/oslo-converter-uml-ea/lib/interfaces/ConverterHandler.ts @@ -190,14 +190,15 @@ export abstract class ConverterHandler { `[ConverterHandler]: Unable to find the URI for object with path ${object.path}. Setting scope to "Undefined".`, ); scope = Scope.Undefined; + return; } - if (uri?.toString().startsWith(packageBaseUri)) { - scope = Scope.InPackage; + if (uri.toString().startsWith(this.config.publicationEnvironment)) { + scope = Scope.InPublicationEnvironment; } - if (uri?.toString().startsWith(this.config.publicationEnvironment)) { - scope = Scope.InPublicationEnvironment; + if (uri.toString().startsWith(packageBaseUri)) { + scope = Scope.InPackage; } quads.push(