@salty-css/core 0.1.0-alpha.1 → 0.1.0-alpha.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/css/merge.cjs CHANGED
@@ -3,7 +3,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const mergeObjects = (...styles) => {
4
4
  return styles.flat().reduce((acc, style) => {
5
5
  if (!style || typeof style !== "object") return acc;
6
- if ("_current" in style && style._current && typeof style._current === "object") return { ...acc, ...style._current };
6
+ if ("_current" in style) {
7
+ let _style = style._current || {};
8
+ if (typeof _style !== "object") _style = {};
9
+ return { ...acc, ..._style };
10
+ }
7
11
  return { ...acc, ...style };
8
12
  }, {});
9
13
  };
package/css/merge.js CHANGED
@@ -1,7 +1,11 @@
1
1
  const mergeObjects = (...styles) => {
2
2
  return styles.flat().reduce((acc, style) => {
3
3
  if (!style || typeof style !== "object") return acc;
4
- if ("_current" in style && style._current && typeof style._current === "object") return { ...acc, ...style._current };
4
+ if ("_current" in style) {
5
+ let _style = style._current || {};
6
+ if (typeof _style !== "object") _style = {};
7
+ return { ...acc, ..._style };
8
+ }
5
9
  return { ...acc, ...style };
6
10
  }, {});
7
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salty-css/core",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "0.1.0-alpha.2",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "typings": "./dist/index.d.ts",