Skip to content

Commit

Permalink
fix: dedupe values in array returned by interceptorScopes()
Browse files Browse the repository at this point in the history
  • Loading branch information
mbargiel committed May 21, 2022
1 parent 630c6c9 commit 6e01cf0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/intercept.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@ function interceptorScopes() {
const nestedInterceptors = Object.values(allInterceptors).map(
i => i.interceptors
)
return [].concat(...nestedInterceptors).map(i => i.scope)
const scopes = new Set([].concat(...nestedInterceptors).map(i => i.scope))
return [...scopes]
}

function isDone() {
Expand Down

0 comments on commit 6e01cf0

Please sign in to comment.