forked from mystiq/hydrogen-web
Use includes instead of elaborate find
Co-authored-by: Bruno Windels <brunow@matrix.org>
This commit is contained in:
parent
a351a185a0
commit
30cb9f6d15
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ export class HomeServerRequest implements IHomeServerRequest {
|
|||
this._promise = sourceRequest.response().then(response => {
|
||||
log?.set("status", response.status);
|
||||
// ok?
|
||||
if (response.status >= 200 && response.status < 300 || options?.allowedErrors?.find(e => e === response.status)) {
|
||||
if (response.status >= 200 && response.status < 300 || options?.allowedErrors?.includes(response.status)) {
|
||||
log?.finish();
|
||||
return response.body;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue