From d030816f81d3f0f6365f4b8a63d37865fdebcdea Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Thu, 26 May 2016 21:14:50 +0100 Subject: [PATCH] Merge pull request #6886 from Weizenlol/patch-1 Added own property check when deleting listeners. (cherry picked from commit ca5a0dad169de8a19f8df6097ea9bc1bb0924a3c) --- src/renderers/shared/stack/event/EventPluginHub.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/renderers/shared/stack/event/EventPluginHub.js b/src/renderers/shared/stack/event/EventPluginHub.js index 270d1665d8e4f..2bbdef1f7054e 100644 --- a/src/renderers/shared/stack/event/EventPluginHub.js +++ b/src/renderers/shared/stack/event/EventPluginHub.js @@ -157,6 +157,10 @@ var EventPluginHub = { */ deleteAllListeners: function(inst) { for (var registrationName in listenerBank) { + if (!listenerBank.hasOwnProperty(registrationName)) { + continue; + } + if (!listenerBank[registrationName][inst._rootNodeID]) { continue; }