mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Remove unnecessary require causing excess memory usage (#6781)
(cherry picked from commit 3703b63a11)
This commit is contained in:
committed by
Paul O’Shannessy
parent
442d78a556
commit
659ff22ea4
@@ -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));
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user