diff --git a/lib/verror.js b/lib/verror.js index 1f5b5ed..0f68142 100644 --- a/lib/verror.js +++ b/lib/verror.js @@ -125,7 +125,7 @@ function WError(options) Error.captureStackTrace(this, ctor || this.constructor); this.name = name || this.constructor.name; if (cause) - this.cause(cause); + WError.prototype.cause.call(this, cause); } mod_util.inherits(WError, Error);