Skip to content

Commit

Permalink
getModifierState should always return a boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
syranide authored and zpao committed Jul 23, 2014
1 parent 9929f6d commit 030071d
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 030071d

Please sign in to comment.