Skip to content

Commit e20011d

Browse files
committed
increase performance increadibly :D
1 parent f0f3b0b commit e20011d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/http.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,7 @@ export default function http(url, request = {}) {
6464
})
6565
}
6666

67-
function shouldDownloadAsText(contentType) {
68-
return /json/.test(contentType) ||
69-
/xml/.test(contentType) ||
70-
/yaml/.test(contentType) ||
71-
/text/.test(contentType)
72-
}
67+
const shouldDownloadAsText = (contentType = "") => /json|xml|yaml|text/.test(contentType)
7368

7469
// Serialize the response, returns a promise with headers and the body part of the hash
7570
export function serializeRes(oriRes, url, {loadSpec = false} = {}) {

0 commit comments

Comments
 (0)