neo.mjs 4.0.47 → 4.0.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo.mjs",
3
- "version": "4.0.47",
3
+ "version": "4.0.48",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
@@ -36,10 +36,13 @@ class WebComponent extends Base {
36
36
  customElements.define('element-loader', class extends HTMLElement {
37
37
  async connectedCallback() {
38
38
  let me = this,
39
- content = await (await fetch(me.getAttribute('src'))).text();
39
+ content = await (await fetch(me.getAttribute('src'))).text(),
40
+ styles;
40
41
 
41
42
  me.attachShadow({mode: 'open'}).innerHTML = content;
42
- me.shadowRoot.append(me.querySelector('style'));
43
+
44
+ styles = me.querySelector('style');
45
+ styles && me.shadowRoot.append(styles);
43
46
  }
44
47
  });
45
48
  }