mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
getModifierState should always return a boolean
(cherry picked from commit 030071dd8b)
This commit is contained in:
committed by
Paul O’Shannessy
parent
b0ab09fc30
commit
eb6d101bae
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user