@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 +1 -1
- package/package.json +1 -1
- package/src/hyperscript.ts +3 -5
package/deno.json
CHANGED
package/package.json
CHANGED
package/src/hyperscript.ts
CHANGED
@@ -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
|
-
|
130
|
-
(
|
131
|
-
|
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
|