diff --git a/packages/ui/src/multiplying-architecture/KaotoEditorFactory.ts b/packages/ui/src/multiplying-architecture/KaotoEditorFactory.ts index 7cf754f1e..48779c088 100644 --- a/packages/ui/src/multiplying-architecture/KaotoEditorFactory.ts +++ b/packages/ui/src/multiplying-architecture/KaotoEditorFactory.ts @@ -13,13 +13,12 @@ export class KaotoEditorFactory implements EditorFactory, initArgs: EditorInitArgs, ): Promise { - let catalogUrl; - const catalogUrlFromChannelApi = await envelopeContext.channelApi.requests.getCatalogURL(); - if (isDefined(catalogUrlFromChannelApi)) { - catalogUrl = catalogUrlFromChannelApi; - } else { + let catalogUrl = await envelopeContext.channelApi.requests.getCatalogURL(); + + if (!isDefined(catalogUrl) || catalogUrl === '') { catalogUrl = `${initArgs.resourcesPathPrefix}${CatalogSchemaLoader.DEFAULT_CATALOG_PATH.replace('.', '')}`; } + return Promise.resolve(new KaotoEditorApp(envelopeContext, initArgs, catalogUrl)); } }