diff --git a/index.js b/index.js index de6fc07..2c707c6 100644 --- a/index.js +++ b/index.js @@ -117,8 +117,8 @@ module.exports = function (h, opts) { ) } } else if (s === VAR && p[1] === TEXT) { - if (p[2] === undefined || p[2] === null) p[2] = '' - else if (!p[2]) p[2] = concat('', p[2]) + if (p[2] === undefined || p[2] === null || p[2] === false) p[2] = '' + else if (!p[2] || p[2] === true) p[2] = concat('', p[2]) if (Array.isArray(p[2][0])) { cur[2].push.apply(cur[2], p[2]) } else { diff --git a/test/types.js b/test/types.js index 13f6c21..f884025 100644 --- a/test/types.js +++ b/test/types.js @@ -15,9 +15,21 @@ test('null value (empty)', function (t) { t.end() }) -test('boolean value', function (t) { +test('string value (empty)', function (t) { + var tree = hx`