@webtides/element-js 1.1.1 → 1.1.2

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/CHANGELOG.md CHANGED
@@ -16,6 +16,12 @@ to [Semantic Versioning](http://semver.org/).
16
16
  <!-- ### Removed -->
17
17
  <!-- ### Fixed -->
18
18
 
19
+ ## [1.1.2] - 2024-10-30
20
+
21
+ ### FIXED
22
+
23
+ - Fixed rerendering of templates that were initially null, prevent runtime errors
24
+
19
25
  ## [1.1.1] - 2024-09-16
20
26
 
21
27
  ### FIXED
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webtides/element-js",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "module": "index.js",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -4,7 +4,10 @@
4
4
  * @param {Element} domNode
5
5
  */
6
6
  const render = (template, domNode) => {
7
- if (typeof template === 'string') {
7
+ if (!template) {
8
+ // empty template was returned
9
+ domNode.innerHTML = '';
10
+ } else if (typeof template === 'string') {
8
11
  // just a plain string (or literal)
9
12
  domNode.innerHTML = template;
10
13
  } else {