Skip to content

Commit

Permalink
Add support for boolean attributes with empty string value. Fixes #17
Browse files Browse the repository at this point in the history
  • Loading branch information
developit committed Dec 9, 2016
1 parent 9f2b202 commit 9ff5c0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ export default function renderToString(vnode, context, opts, inner) {
if (name==='dangerouslySetInnerHTML') {
html = v && v.__html;
}
else if ((v || v===0) && typeof v!=='function') {
if (v===true) {
else if ((v || v===0 || v==='') && typeof v!=='object' && typeof v!=='function') {
if (v===true || v==='') {
v = name;
// in non-xml mode, allow boolean attributes
if (!opts || !opts.xml) {
Expand Down

0 comments on commit 9ff5c0e

Please sign in to comment.