@davidcal/frosth 1.0.2 → 1.0.3

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Frosth - Yet another UI framework
2
2
 
3
- **Latest version**: v1.0.2
3
+ **Latest version**: v1.0.3
4
4
 
5
5
  ## Motivation
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@davidcal/frosth",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Async-first CRUD-last UI framework that treats encapsulation as a solved problem.",
5
5
  "type": "module",
6
6
  "main": "./src/sigew.js",
package/src/h.js CHANGED
@@ -27,7 +27,14 @@ export const h = (s, tag, props, children) => {
27
27
  });
28
28
  } else {
29
29
  s.create_effect((s) => {
30
- el.setAttribute(key, props[key](s));
30
+ const prop$ = props[key](s);
31
+
32
+ if (prop$ === undefined) {
33
+ el.removeAttribute(key);
34
+ return;
35
+ }
36
+
37
+ el.setAttribute(key, prop$);
31
38
  });
32
39
  }
33
40
  }
package/src/render.js CHANGED
@@ -35,8 +35,6 @@ const render_diff = (s, prev, next, target) => {
35
35
  };
36
36
 
37
37
  export const render = async (s, target, installed, state) => {
38
- console.log("rendering", installed, typeof installed);
39
-
40
38
  if (typeof installed === "string") {
41
39
  target.textContent = installed;
42
40