tailwind-to-style 1.1.2 → 1.1.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.
Files changed (2) hide show
  1. package/index.js +10 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -5711,6 +5711,16 @@ const breakpoints = {
5711
5711
  };
5712
5712
 
5713
5713
  function tws(classNames, convertToJson) {
5714
+ if (
5715
+ [
5716
+ !classNames,
5717
+ typeof classNames !== "string",
5718
+ classNames.trim() === "",
5719
+ ].includes(true)
5720
+ ) {
5721
+ return convertToJson ? {} : "";
5722
+ }
5723
+
5714
5724
  const cssString = generateTailwindCssString().replace(/\s\s+/g, " ");
5715
5725
  const cssObject = convertCssToObject(cssString);
5716
5726
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwind-to-style",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Convert tailwind classes to inline style",
5
5
  "main": "index.js",
6
6
  "scripts": {