preact-render-to-string
Advanced tools
Comparing version 3.6.1 to 3.6.2
@@ -237,3 +237,3 @@ (function (global, factory) { | ||
if (!hasLarge && pretty && isLargeString(ret)) hasLarge = true; | ||
pieces.push(ret); | ||
if (ret) pieces.push(ret); | ||
} | ||
@@ -240,0 +240,0 @@ } |
@@ -249,3 +249,3 @@ (function (global, factory) { | ||
if (!hasLarge && pretty && isLargeString(ret)) hasLarge = true; | ||
pieces.push(ret); | ||
if (ret) pieces.push(ret); | ||
} | ||
@@ -252,0 +252,0 @@ } |
{ | ||
"name": "preact-render-to-string", | ||
"amdName": "preactRenderToString", | ||
"version": "3.6.1", | ||
"version": "3.6.2", | ||
"description": "Render JSX to an HTML string, with support for Preact components.", | ||
@@ -49,3 +49,3 @@ "main": "dist/index.js", | ||
"mocha": "^3.0.0", | ||
"preact": "^7.1.0", | ||
"preact": "^8.1.0", | ||
"rollup": "^0.34.3", | ||
@@ -52,0 +52,0 @@ "rollup-plugin-babel": "^2.6.1", |
@@ -184,3 +184,3 @@ import { objectKeys, encodeEntities, falsey, memoize, indent, isLargeString, styleObjToCss, hashToClassName, assign, getNodeProps } from './util'; | ||
if (!hasLarge && pretty && isLargeString(ret)) hasLarge = true; | ||
pieces.push(ret); | ||
if (ret) pieces.push(ret); | ||
} | ||
@@ -187,0 +187,0 @@ } |
@@ -99,3 +99,3 @@ import render from '../src/jsx'; | ||
}); | ||
it('should render attributes containing VNodes', () => { | ||
@@ -149,2 +149,15 @@ expect(renderJsx( | ||
it('should skip null siblings', () => { | ||
expect(renderJsx( | ||
<jsx> | ||
<span/> | ||
{null} | ||
</jsx> | ||
)).to.deep.equal(dedent` | ||
<jsx> | ||
<span></span> | ||
</jsx> | ||
`); | ||
}); | ||
it('should skip functions if functions=false', () => { | ||
@@ -151,0 +164,0 @@ expect(renderJsx( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
131020
1842