Fix ctor instanceof guard

The ! operator is higher priority than the instanceof operator, so the
expression (! this instanceof X) is the same as ((!this) instanceof X),
which will always evaluate to false.
This commit is contained in:
Ryan Graham 2014-08-08 18:15:55 -07:00
parent e8aec58222
commit 58df808325

View file

@ -233,7 +233,7 @@ function resolveLevel(nameOrNum) {
*/
function Logger(options, _childOptions, _childSimple) {
xxx('Logger start:', options)
if (! this instanceof Logger) {
if (!(this instanceof Logger)) {
return new Logger(options, _childOptions);
}