Skip to content

Commit

Permalink
fix: false values are removed from style string. closes #1692 (#1693)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlrawlings committed May 14, 2021
1 parent 5de6157 commit ac140d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/marko/src/runtime/helpers/style-value.js
Expand Up @@ -23,7 +23,7 @@ module.exports = function styleHelper(style) {
} else if (type === "object") {
for (var name in style) {
var value = style[name];
if (value != null) {
if (value != null && value !== false) {
if (typeof value === "number" && value) {
value += "px";
}
Expand Down
@@ -1 +1 @@
div style={color: 'red', fontWeight: 'bold', 'background-color':'blue'}
div style={color: 'red', margin: false, fontWeight: 'bold', 'background-color':'blue'}

0 comments on commit ac140d4

Please sign in to comment.