diff --git a/package.json b/package.json index 91e0cfe..756f218 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eventemitter-promise", - "version": "0.0.2", + "version": "0.0.3", "description": "Event Emitter with lazy promise.", "main": "bin/EventEmitter.node.js", "scripts": { diff --git a/src/EventEmitter.js b/src/EventEmitter.js index a142919..4456f57 100644 --- a/src/EventEmitter.js +++ b/src/EventEmitter.js @@ -120,7 +120,7 @@ if (typeof(module) !== 'undefined' && module.exports) { * @private */ _destroyPromise(event) { - this._promises[event].kill(); + this._promises[event] && this._promises[event].kill(); delete this._promises[event]; }