From 6f2b43e50462664b2b5d0a64f913ce9e6f9e0ba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 22 May 2024 10:44:45 +0200 Subject: [PATCH] make sure only to fire this console error if there is no element name define --- .../functions/create-extension-element.function.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/libs/extension-api/functions/create-extension-element.function.ts b/src/Umbraco.Web.UI.Client/src/libs/extension-api/functions/create-extension-element.function.ts index 754b8ea7aa..fe503df335 100644 --- a/src/Umbraco.Web.UI.Client/src/libs/extension-api/functions/create-extension-element.function.ts +++ b/src/Umbraco.Web.UI.Client/src/libs/extension-api/functions/create-extension-element.function.ts @@ -11,7 +11,7 @@ export async function createExtensionElement( const elementConstructor = await loadManifestElement(elementPropValue); if (elementConstructor) { return new elementConstructor(); - } else { + } else if (!manifest.elementName) { console.error( `-- Extension of alias "${manifest.alias}" did not succeed creating an element class instance via the extension manifest property '${elementPropValue}'. The imported Element JS file did not export a 'element' or 'default'. Alternatively define the 'elementName' in the manifest.`, manifest,