Skip to content

Commit

Permalink
use instanceof to check if the return value from a topic is an EventE…
Browse files Browse the repository at this point in the history
…mitter

Signed-off-by: seebees <seebees@gmail.com>
  • Loading branch information
seebees committed Jul 17, 2011
1 parent 3e98285 commit 96a17a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/vows/suite.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ this.Suite.prototype = new(function () {

// If the topic doesn't return an event emitter (such as a promise),
// we create it ourselves, and emit the value on the next tick.
if (! (topic && topic.constructor === events.EventEmitter)) {
if (! (topic instanceof events.EventEmitter)) {
ctx.emitter = new(events.EventEmitter);

if (! ctx._callback) {
Expand Down

0 comments on commit 96a17a2

Please sign in to comment.