1

Closed

Bug in instance check

description

This statement is always true to me, e.g. we do: var log = Trace('mymodule');

if (!this instanceof Trace) {
throw new Error('Trace object must be initialised with the "new" keyword.');
}

It's working if I change it to this:

if (!(this instanceof Trace)) {
throw new Error('Trace object must be initialised with the "new" keyword.');
}
Closed Feb 11, 2014 at 7:48 PM by tommck

comments

tommck wrote Feb 6, 2014 at 1:18 PM

Good catch! I will get that fixed ASAP.

tommck wrote Feb 11, 2014 at 6:13 PM

This is now fixed in the latest release (1.3.1).. NuGet packages are out there as well.

wrote Feb 11, 2014 at 7:48 PM