Use `res.ok` instead of 200-299
(cherry picked from commit b667a68bd4eb916084658592d2942d521950005b)
This commit is contained in:
parent
59adc13b03
commit
c4bd6dfb6b
|
@ -206,8 +206,7 @@ export class ApRequestService {
|
||||||
const contentType = res.headers.get('content-type');
|
const contentType = res.headers.get('content-type');
|
||||||
|
|
||||||
if (
|
if (
|
||||||
res.status >= 200
|
res.ok
|
||||||
&& res.status <= 299
|
|
||||||
&& (contentType ?? '').split(';')[0].trimEnd().toLowerCase() === 'text/html'
|
&& (contentType ?? '').split(';')[0].trimEnd().toLowerCase() === 'text/html'
|
||||||
&& _followAlternate === true
|
&& _followAlternate === true
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Reference in New Issue