Skip to content

Commit

Permalink
Merge pull request #8 from ivancuric/filter-falsey
Browse files Browse the repository at this point in the history
Filter all out falsy values in the `html` helper.
  • Loading branch information
stasm authored Sep 8, 2017
2 parents ff368c9 + 256c021 commit 9267a6b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ export default function html([first, ...strings], ...values) {
return values.reduce(
(acc, cur) => acc.concat(cur, strings.shift()),
[first]
).join("");
)
.filter(Boolean)
.join("");
}

export function createStore(reducer) {
Expand Down

0 comments on commit 9267a6b

Please sign in to comment.