mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Fix TypeError in SyntheticEvent
I suspect that plugins are modifying `Object.prototype` which is causing TypeErrors in `SyntheticEvent`. Let's fix it.
This commit is contained in:
committed by
Paul O’Shannessy
parent
bbb4a367be
commit
cf3ff07f92
@@ -68,6 +68,9 @@ function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent) {
|
||||
|
||||
var Interface = this.constructor.Interface;
|
||||
for (var propName in Interface) {
|
||||
if (!Interface.hasOwnProperty(propName)) {
|
||||
continue;
|
||||
}
|
||||
var normalize = Interface[propName];
|
||||
if (normalize) {
|
||||
this[propName] = normalize(nativeEvent);
|
||||
|
||||
Reference in New Issue
Block a user