@ryupold/vode 0.12.1 → 0.12.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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/src/vode.ts +2 -2
  3. package/vode.mjs +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryupold/vode",
3
- "version": "0.12.1",
3
+ "version": "0.12.2",
4
4
  "description": "Small web framework for minimal websites",
5
5
  "author": "Michael Scherbakow (ryupold)",
6
6
  "license": "MIT",
package/src/vode.ts CHANGED
@@ -289,10 +289,10 @@ export function mergeClass(a: ClassProp, b: ClassProp): ClassProp {
289
289
  for (const item of a as string[]) {
290
290
  aa[item] = true;
291
291
  }
292
- for (const bKey of (<Record<string, any>>b).keys) {
292
+ for (const bKey of Object.keys(b)) {
293
293
  aa[bKey] = (<Record<string, boolean | null | undefined>>b)[bKey];
294
294
  }
295
- return b;
295
+ return aa;
296
296
  }
297
297
 
298
298
  throw new Error(`cannot merge classes of ${a} (${typeof a}) and ${b} (${typeof b})`);
package/vode.mjs CHANGED
@@ -164,10 +164,10 @@ function mergeClass(a, b) {
164
164
  for (const item of a) {
165
165
  aa[item] = true;
166
166
  }
167
- for (const bKey of b.keys) {
167
+ for (const bKey of Object.keys(b)) {
168
168
  aa[bKey] = b[bKey];
169
169
  }
170
- return b;
170
+ return aa;
171
171
  }
172
172
  throw new Error(`cannot merge classes of ${a} (${typeof a}) and ${b} (${typeof b})`);
173
173
  }