mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader
synced 2025-08-15 01:16:01 +08:00
fix
This commit is contained in:
parent
1bd3ed7125
commit
f8bc4877ef
@ -328,7 +328,7 @@ export class SnapshotFormatter extends AsyncService {
|
|||||||
if (snapshot.status) {
|
if (snapshot.status) {
|
||||||
const code = snapshot.status;
|
const code = snapshot.status;
|
||||||
const n = code - 200;
|
const n = code - 200;
|
||||||
if (n < 100 || n >= 100) {
|
if (n < 0 || n >= 100) {
|
||||||
const text = snapshot.statusText || STATUS_CODES[code];
|
const text = snapshot.statusText || STATUS_CODES[code];
|
||||||
formatted.warning = `Target URL returned error ${code}${text? `: ${text}` : ''}`;
|
formatted.warning = `Target URL returned error ${code}${text? `: ${text}` : ''}`;
|
||||||
}
|
}
|
||||||
@ -436,7 +436,7 @@ ${suffixMixins.length ? `\n${suffixMixins.join('\n\n')}\n` : ''}`;
|
|||||||
if (snapshot.status) {
|
if (snapshot.status) {
|
||||||
const code = snapshot.status;
|
const code = snapshot.status;
|
||||||
const n = code - 200;
|
const n = code - 200;
|
||||||
if (n < 100 || n >= 100) {
|
if (n < 0 || n >= 100) {
|
||||||
const text = snapshot.statusText || STATUS_CODES[code];
|
const text = snapshot.statusText || STATUS_CODES[code];
|
||||||
mixin.warning = `Target URL returned error ${code}${text ? `: ${text}` : ''}`;
|
mixin.warning = `Target URL returned error ${code}${text ? `: ${text}` : ''}`;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user