hadars 0.1.30 → 0.1.31

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/dist/cli.js CHANGED
@@ -558,7 +558,9 @@ function renderAttributes(props, isSvg) {
558
558
  continue;
559
559
  }
560
560
  if (key === "style" && typeof value === "object") {
561
- attrs += ` style="${escapeAttr(styleObjectToString(value))}"`;
561
+ const styleStr = styleObjectToString(value);
562
+ if (styleStr)
563
+ attrs += ` style="${escapeAttr(styleStr)}"`;
562
564
  continue;
563
565
  }
564
566
  attrs += ` ${attrName}="${escapeAttr(String(value))}"`;
@@ -541,7 +541,9 @@ function renderAttributes(props, isSvg) {
541
541
  continue;
542
542
  }
543
543
  if (key === "style" && typeof value === "object") {
544
- attrs += ` style="${escapeAttr(styleObjectToString(value))}"`;
544
+ const styleStr = styleObjectToString(value);
545
+ if (styleStr)
546
+ attrs += ` style="${escapeAttr(styleStr)}"`;
545
547
  continue;
546
548
  }
547
549
  attrs += ` ${attrName}="${escapeAttr(String(value))}"`;
@@ -440,7 +440,9 @@ function renderAttributes(props, isSvg) {
440
440
  continue;
441
441
  }
442
442
  if (key === "style" && typeof value === "object") {
443
- attrs += ` style="${escapeAttr(styleObjectToString(value))}"`;
443
+ const styleStr = styleObjectToString(value);
444
+ if (styleStr)
445
+ attrs += ` style="${escapeAttr(styleStr)}"`;
444
446
  continue;
445
447
  }
446
448
  attrs += ` ${attrName}="${escapeAttr(String(value))}"`;
@@ -465,7 +465,9 @@ function renderAttributes(props, isSvg) {
465
465
  continue;
466
466
  }
467
467
  if (key === "style" && typeof value === "object") {
468
- attrs += ` style="${escapeAttr(styleObjectToString(value))}"`;
468
+ const styleStr = styleObjectToString(value);
469
+ if (styleStr)
470
+ attrs += ` style="${escapeAttr(styleStr)}"`;
469
471
  continue;
470
472
  }
471
473
  attrs += ` ${attrName}="${escapeAttr(String(value))}"`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hadars",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "description": "Minimal SSR framework for React — rspack, HMR, TypeScript, Bun/Node/Deno",
5
5
  "module": "./dist/index.js",
6
6
  "type": "module",
@@ -300,7 +300,8 @@ function renderAttributes(props: Record<string, any>, isSvg: boolean): string {
300
300
  continue;
301
301
  }
302
302
  if (key === "style" && typeof value === "object") {
303
- attrs += ` style="${escapeAttr(styleObjectToString(value))}"`;
303
+ const styleStr = styleObjectToString(value);
304
+ if (styleStr) attrs += ` style="${escapeAttr(styleStr)}"`;
304
305
  continue;
305
306
  }
306
307
  attrs += ` ${attrName}="${escapeAttr(String(value))}"`;