@schukai/monster 3.22.0 → 3.22.1

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schukai/monster",
3
- "version": "3.22.0",
3
+ "version": "3.22.1",
4
4
  "description": "Monster is a simple library for creating fast, robust and lightweight websites.",
5
5
  "keywords": [
6
6
  "framework",
@@ -545,10 +545,13 @@ function internalTemplateLookUp(container, key, ref, path) {
545
545
 
546
546
  const rootNode = container.getRootNode();
547
547
  if (rootNode instanceof ShadowRoot) {
548
- templateID = rootNode.host.getAttribute(ATTRIBUTE_UPDATER_INSERT_TEMPLATE_ID);
549
- template = findDocumentTemplate(templateID, container);
550
- if (template instanceof HTMLTemplateElement) {
551
- return template;
548
+ const host = rootNode?.host;
549
+ if (host && host.hasAttribute(ATTRIBUTE_UPDATER_INSERT_TEMPLATE_ID)) {
550
+ templateID = host.getAttribute(ATTRIBUTE_UPDATER_INSERT_TEMPLATE_ID);
551
+ template = findDocumentTemplate(templateID, container);
552
+ if (template instanceof HTMLTemplateElement) {
553
+ return template;
554
+ }
552
555
  }
553
556
  }
554
557
 
@@ -142,7 +142,7 @@ function getMonsterVersion() {
142
142
  }
143
143
 
144
144
  /** don't touch, replaced by make with package.json version */
145
- monsterVersion = new Version("3.22.0");
145
+ monsterVersion = new Version("3.22.1");
146
146
 
147
147
  return monsterVersion;
148
148
  }
@@ -7,7 +7,7 @@ describe('Monster', function () {
7
7
  let monsterVersion
8
8
 
9
9
  /** don´t touch, replaced by make with package.json version */
10
- monsterVersion = new Version("3.22.0")
10
+ monsterVersion = new Version("3.22.1")
11
11
 
12
12
  let m = getMonsterVersion();
13
13