Skip to content

Commit 9203a56

Browse files
committed
Removed redundant browser check.
1 parent 075c900 commit 9203a56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/request.web.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default function (baseUrl, options) {
4747
return function request ({method, url, headers, body}, cb) {
4848
const auth = typeof username === 'string' ? {username, password} : {}
4949

50-
if (typeof window !== 'undefined' && auth.username !== undefined && headers['Authorization'] === undefined) {
50+
if (auth.username !== undefined && headers['Authorization'] === undefined) {
5151
const btoa = window.btoa ? window.btoa : window.base64.encode
5252
headers['Authorization'] = 'Basic ' + btoa(auth.username + ':' + auth.password)
5353
}

0 commit comments

Comments
 (0)