Skip to content

Commit

Permalink
Added own property check when deleting listeners.
Browse files Browse the repository at this point in the history
React crash when default object prototype is modified.
  • Loading branch information
grigorii-zander committed May 26, 2016
1 parent 2d74280 commit b1882f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/renderers/shared/stack/event/EventPluginHub.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b1882f8

Please sign in to comment.