The library for web and native user interfaces.
Fix TypeError in SyntheticEvent
I suspect that plugins are modifying `Object.prototype` which is causing TypeErrors in `SyntheticEvent`. Let's fix it.
Tim Yung committed
Jul 22, 2013 at 18:28 UTC
cf3ff07f92736476d15d1ed7f5fc04274d2a8b77
1 file changed
+3
src/event/synthetic/SyntheticEvent.js
+3
@@ -68,6 +68,9 @@ function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent) {
68
69
var Interface = this.constructor.Interface;
70
for (var propName in Interface) {
71
+ if (!Interface.hasOwnProperty(propName)) {
72
+ continue;
73
+ }
74
var normalize = Interface[propName];
75
if (normalize) {
76
this[propName] = normalize(nativeEvent);