Fix parent 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
e4ea3fb05f
commit
c3b8dd26a7
1 changed files with 1 additions and 1 deletions
|
@ -242,7 +242,7 @@ function Logger(options, _childOptions, _childSimple) {
|
|||
if (_childOptions !== undefined) {
|
||||
parent = options;
|
||||
options = _childOptions;
|
||||
if (! parent instanceof Logger) {
|
||||
if (!(parent instanceof Logger)) {
|
||||
throw new TypeError(
|
||||
'invalid Logger creation: do not pass a second arg');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue