on master help sign in
Use simpler color update logic

relies on the fact that the default background color is transparent

commit62d3a02507a0f95252f19e0331b52fafc524d568 authorEvan Czaplicki <info@elm-lang.org> dateThu 24 Jul 2014, 20:01 (12 years ago) parentc7ab521
1 file changed+2−2
runtime/Render/Element.js+2−2
runtime/Render/Element.js+2−2
@@ -373,9 +373,9 @@ function updateProps(node, curr, next) {
373373
374374 var nextColor = nextProps.color.ctor === 'Just'
375375 ? colorToCss(nextProps.color._0)
376− : '';
376+ : 'transparent';
377377 if (node.style.backgroundColor !== nextColor) {
378− node.style.backgroundColor = (nextColor === '' ? 'transparent' : nextColor);
378+ node.style.backgroundColor = nextColor;
379379 }
380380
381381 if (nextProps.tag !== currProps.tag) {