Skip to content

Commit

Permalink
allow attributes to be set conditionally (fixes #25)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Jul 12, 2017
1 parent 11ff0de commit 5e1dc22
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/moon.js
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@
var vnodePropValue = vnodeProps[vnodePropName];
var nodePropValue = nodeProps[vnodePropName];

if((vnodePropValue !== undefined || vnodePropValue !== false || vnodePropValue !== null) && ((nodePropValue === undefined || nodePropValue === false || nodePropValue === null) || vnodePropValue !== nodePropValue)) {
if((vnodePropValue !== undefined && vnodePropValue !== false && vnodePropValue !== null) && ((nodePropValue === undefined || nodePropValue === false || nodePropValue === null) || vnodePropValue !== nodePropValue)) {
if(vnodePropName.length === 10 && vnodePropName === "xlink:href") {
node.setAttributeNS('http://www.w3.org/1999/xlink', "href", vnodePropValue);
} else {
Expand Down
Loading

0 comments on commit 5e1dc22

Please sign in to comment.