diff --git a/package.json b/package.json index dcdad30..6a5bc71 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@leuffen/jodastyle", - "version": "3.0.6", + "version": "3.0.7", "description": "", "main": "./dist/index.js", "module": "./dist/index.module.js", diff --git a/src/helper/functions.ts b/src/helper/functions.ts index ad4a212..c6c81f0 100755 --- a/src/helper/functions.ts +++ b/src/helper/functions.ts @@ -137,7 +137,7 @@ function copyDataChildAttributes(source : HTMLElement, target : HTMLElement) { let slotIndex = 0; export async function getTemplateFilledWithContent(templateSelector : string, content : HTMLElement, origElement : HTMLElement) : Promise { let templateConfig = Joda.getRegisteredTemplate(templateSelector); - let templateHtml = templateConfig.template ?? null; + let templateHtml = templateConfig?.template ?? null; if (templateHtml === null) { let template = document.querySelector(templateSelector);