Skip to content

Commit 0394c5d

Browse files
authored
Merge pull request titel-media#3 from mrbbot/master
fix: add default status to Response.redirect
2 parents 84b2aaa + fe06543 commit 0394c5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/response.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ export default class Response {
7676
});
7777
}
7878

79-
static redirect(url, status) {
79+
static redirect(url, status = 302) {
8080
//1. Let parsedURL be the result of parsing url with current settings object’s API base URL.
8181
//2. If parsedURL is failure, then throw a TypeError.
8282
const parsedURL = parse_url(url);
8383

8484
//3. If status is not a redirect status, then throw a RangeError.
85-
let intStatus = parseInt(status, 10);å
85+
let intStatus = parseInt(status, 10);
8686
if(intStatus < 300 || intStatus > 399) {
8787
throw new RangeError('Not a redirect status');
8888
}

0 commit comments

Comments
 (0)