Skip to content

Commit 5b2ae84

Browse files
committed
(fix) Check topic.constructor to reverse regression introduced by instanceof check
1 parent c7f9e3c commit 5b2ae84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/vows/suite.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ this.Suite.prototype = new(function () {
142142

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

148148
if (! ctx._callback) {

0 commit comments

Comments
 (0)