Permalink
Browse files

[fix] Fix crashes on node v0.9.3

Fixes #230.
  • Loading branch information...
1 parent 808a773 commit f412e4a568481817faea0ce5c8f2bc53f6153f67 @mmalecki mmalecki committed Sep 26, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/vows/suite.js
View
@@ -228,7 +228,7 @@ this.Suite.prototype = new(function () {
// synchronously.
if (topic &&
ctx.name !== 'on' &&
- !topic._vowsEmitedEvents.hasOwnProperty(ctx.event)) {
+ (!topic._vowsEmitedEvents || !topic._vowsEmitedEvents.hasOwnProperty(ctx.event))) {
topic.on(ctx.event, function (ctx) {
return function (val) {
return run(new(Context)(vow, ctx, env), lastTopic);

0 comments on commit f412e4a

Please sign in to comment.