We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 075c900 commit 9203a56Copy full SHA for 9203a56
src/util/request.web.js
@@ -47,7 +47,7 @@ export default function (baseUrl, options) {
47
return function request ({method, url, headers, body}, cb) {
48
const auth = typeof username === 'string' ? {username, password} : {}
49
50
- if (typeof window !== 'undefined' && auth.username !== undefined && headers['Authorization'] === undefined) {
+ if (auth.username !== undefined && headers['Authorization'] === undefined) {
51
const btoa = window.btoa ? window.btoa : window.base64.encode
52
headers['Authorization'] = 'Basic ' + btoa(auth.username + ':' + auth.password)
53
}
0 commit comments