on master help sign in
Use simpler color update logic
62d3a02Evan Czaplicki
runtime/Render/Element.js+2−2
@@ -373,9 +373,9 @@ function updateProps(node, curr, next) {
373
373
374 var nextColor = nextProps.color.ctor === 'Just'
374 var nextColor = nextProps.color.ctor === 'Just'
375 ? colorToCss(nextProps.color._0)
375 ? colorToCss(nextProps.color._0)
376− : '';
376+ : 'transparent';
377 if (node.style.backgroundColor !== nextColor) {
377 if (node.style.backgroundColor !== nextColor) {
378− node.style.backgroundColor = (nextColor === '' ? 'transparent' : nextColor);
378+ node.style.backgroundColor = nextColor;
379 }
379 }
380
380
381 if (nextProps.tag !== currProps.tag) {
381 if (nextProps.tag !== currProps.tag) {