Skip to content

Commit

Permalink
Remove unnecessary require causing excess memory usage (#6781)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmck authored and sophiebits committed May 16, 2016
1 parent 207fe0b commit 3703b63
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/renderers/dom/client/syntheticEvents/SyntheticEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,9 @@ Object.assign(SyntheticEvent.prototype, {
this[shouldBeReleasedProperties[i]] = null;
}
if (__DEV__) {
var noop = require('emptyFunction');
Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', noop));
Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', noop));
Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
}
},

Expand Down

0 comments on commit 3703b63

Please sign in to comment.