Skip to content

Commit

Permalink
Merge pull request facebook#1865 from syranide/modistatefalse
Browse files Browse the repository at this point in the history
getModifierState should always return a boolean
  • Loading branch information
zpao committed Jul 23, 2014
2 parents 79076fa + 030071d commit 13e2c38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/browser/ui/dom/getEventModifierState.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function modifierStateGetter(keyArg) {
return nativeEvent.getModifierState(keyArg);
}
var keyProp = modifierKeyToProp[keyArg];
return keyProp && nativeEvent[keyProp];
return keyProp ? !!nativeEvent[keyProp] : false;
}

function getEventModifierState(nativeEvent) {
Expand Down

0 comments on commit 13e2c38

Please sign in to comment.