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
1 changed files with 1 additions and 1 deletions

View File

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