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:
Tim Yung
2013-07-22 18:31:08 -07:00
committed by Paul O’Shannessy
parent bbb4a367be
commit cf3ff07f92
+3
View File
@@ -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);