From cf3ff07f92736476d15d1ed7f5fc04274d2a8b77 Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Mon, 22 Jul 2013 18:28:30 -0700 Subject: [PATCH] Fix TypeError in SyntheticEvent I suspect that plugins are modifying `Object.prototype` which is causing TypeErrors in `SyntheticEvent`. Let's fix it. --- src/event/synthetic/SyntheticEvent.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/event/synthetic/SyntheticEvent.js b/src/event/synthetic/SyntheticEvent.js index 2370528851..efd849edc4 100644 --- a/src/event/synthetic/SyntheticEvent.js +++ b/src/event/synthetic/SyntheticEvent.js @@ -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);