@wrnrlr/prelude 0.1.4 → 0.1.5

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/deno.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrnrlr/prelude",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "exports": "./src/mod.ts",
5
5
  "compilerOptions": {
6
6
  "strict": false,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wrnrlr/prelude",
3
3
  "type": "module",
4
- "version": "0.1.4",
4
+ "version": "0.1.5",
5
5
  "author": "Werner Laurensse",
6
6
  "description": "A signal based frontend library with fine-grained reactivity",
7
7
  "main": "./src/mod.ts",
@@ -126,11 +126,9 @@ export function hyperscript(r:Runtime, patch?:any):HyperScript {
126
126
  if (tag.id) e.setAttribute('id',tag.id)
127
127
  if (tag.classes?.length) {
128
128
  const cd = Object.getOwnPropertyDescriptor(props2,'class') ?? ({value:'',writable:true,enumerable:true} as any);
129
- if (cd.value) {
130
- (props2 as any).class = (cd.value?.call) ?
131
- () => [...tag.classes,...cd.value().split(' ')].filter(c=>c).join(' ') :
132
- [...tag.classes,...cd.value.split(' ')].filter(c=>c).join(' ')
133
- }
129
+ (props2 as any).class = (cd.value?.call) ?
130
+ () => [...tag.classes,...(cd.value()??'').split(' ')].filter(c=>c).join(' ') :
131
+ [...tag.classes,...(cd.value??'').split(' ')].filter(c=>c).join(' ')
134
132
  }
135
133
  if (patch) patch(props2)
136
134
  let dynamic = false