diff --git a/src/index.ts b/src/index.ts index a314c5de..1c5a0b41 100644 --- a/src/index.ts +++ b/src/index.ts @@ -236,7 +236,7 @@ class Logging { ]; for (const clientClass of clientClasses) { for (const scope of clientClass.scopes) { - if (clientClasses.indexOf(scope) === -1) { + if (scopes.indexOf(scope) === -1) { scopes.push(scope); } } diff --git a/test/index.ts b/test/index.ts index 73b9ac24..02fb5663 100644 --- a/test/index.ts +++ b/test/index.ts @@ -153,7 +153,7 @@ describe('Logging', () => { for (const clientClass of clientClasses) { for (const scope of clientClass.scopes) { - if (clientClasses.indexOf(scope) === -1) { + if (EXPECTED_SCOPES.indexOf(scope) === -1) { EXPECTED_SCOPES.push(scope); } }