diff --git a/frontend/src/services/http-client/http-client.js b/frontend/src/services/http-client/http-client.js index 34fba00dc..81f72485e 100644 --- a/frontend/src/services/http-client/http-client.js +++ b/frontend/src/services/http-client/http-client.js @@ -21,7 +21,7 @@ export class HttpClient { if (typeof interceptor !== 'function') { throw new Error(`Cannot remove Interceptor ${interceptor}, because it is not of type function`); } - if(this._responseInterceptors.filter(el => el == interceptor).length !== 1) { + if(this._responseInterceptors.filter(el => el == interceptor).length === 0) { throw new Error(`Could not find Response Interceptor ${interceptor}.`); } this._responseInterceptors = this._responseInterceptors.filter(el => el !== interceptor);