@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 +6 -0
- package/package.json +1 -1
- package/src/dom-parts/render.js +4 -1
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
package/src/dom-parts/render.js
CHANGED
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
* @param {Element} domNode
|
|
5
5
|
*/
|
|
6
6
|
const render = (template, domNode) => {
|
|
7
|
-
if (
|
|
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 {
|