diff --git a/Libraries/EventEmitter/mixInEventEmitter.js b/Libraries/EventEmitter/mixInEventEmitter.js index 27b6726ed..d5db027bb 100644 --- a/Libraries/EventEmitter/mixInEventEmitter.js +++ b/Libraries/EventEmitter/mixInEventEmitter.js @@ -14,7 +14,6 @@ const EventEmitter = require('EventEmitter'); const EventEmitterWithHolding = require('EventEmitterWithHolding'); const EventHolder = require('EventHolder'); -const EventValidator = require('EventValidator'); const invariant = require('fbjs/lib/invariant'); const keyOf = require('fbjs/lib/keyOf'); @@ -119,7 +118,10 @@ const EventEmitterMixin = { __getEventEmitter: function() { if (!this.__eventEmitter) { let emitter = new EventEmitter(); - emitter = EventValidator.addValidation(emitter, this.__types); + if (__DEV__) { + const EventValidator = require('EventValidator'); + emitter = EventValidator.addValidation(emitter, this.__types); + } const holder = new EventHolder(); this.__eventEmitter = new EventEmitterWithHolding(emitter, holder);