Skip to content

Commit

Permalink
Fixed bug with setting a style property to a unknown value in IE8 and…
Browse files Browse the repository at this point in the history
… lower
  • Loading branch information
ausi committed May 13, 2013
1 parent 8cd9a02 commit 3f5f372
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/testProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ define(['contains', 'mStyle', 'createElement', 'nativeTestProps', 'is'], functio

// If value to test has been passed in, do a set-and-check test
if (!skipValueTest && !is(value, 'undefined')) {
mStyle.style[prop] = value;
// Needs a try catch block because of IE
try {
mStyle.style[prop] = value;
} catch (e) {}

if (mStyle.style[prop] != before) {
cleanElems();
Expand Down

0 comments on commit 3f5f372

Please sign in to comment.