on master help sign in
Fix display bug in latest Chrome build.
commit7d09fb6972cc0f690e905095a24e133ec4e4ddd3 authorevancz <info@elm-lang.org> dateSat 28 Jul 2012, 20:32 (14 years ago) parent6c90aba
1 file changed+2−2
core-js/runtime/Dispatcher.js+2−2
core-js/runtime/Dispatcher.js+2−2
@@ -137,8 +137,8 @@ var Dispatcher = function() {
137137 }
138138 if (len === 1) {
139139 var dim = correctSize(kids[0]);
140− if (e.style.width !== "") { dim[0] = e.style.width.slice(0,-2) - 0; }
141− if (e.style.height !== "") { dim[1] = e.style.height.slice(0,-2) - 0; }
140+ if (e.style.hasOwnProperty('width') && e.style.width.length > 0) { dim[0] = e.style.width.slice(0,-2) - 0; }
141+ if (e.style.hasOwnProperty('height') && e.style.height.length > 0) { dim[1] = e.style.height.slice(0,-2) - 0; }
142142 if (dim[0] !== 0) { e.style.width = dim[0] + "px"; }
143143 if (dim[1] !== 0) { e.style.height = dim[1] + "px"; }
144144 return dim;