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:
parent
e8aec58222
commit
58df808325
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue